Question

I have a dojo layout with two content panes, each at 50% height, one on top of the other. The top one is filled with a dojo grid. I have this grid loading with data dynamically. I would like to populate the bottom content pane with a form to edit the details of this row in the grid. I have successfully attached the onRowClick to dynamically retrieve the data I need for the details of that row.

dojo.connect(grid, 'onRowClick', function(e) {
   detailIssueCp.attr('href', '/rest-issue/get/id/' + e.grid._by_idx[e.rowIndex].item._id);
});

As well as detecting when that data has been retrieved:

  dojo.connect(detailIssueCp, 'onDownloadEnd', function(e)
  {
     var jsonValue = detailIssueCp.domNode.innerText;
     // attempt at making a form...
  }

I would like to build a form that is well formatted (like in a table or something) and place it in the bottom content pane, but my attempts to do so end in poorly behaving and poorly formatted forms.

Does anyone have a design pattern that would be useful here? I have a feeling I am doing this incorrectly.

Was it helpful?

Solution

Well, it appears that the solution is to ask for the form in HTML format. I was trying to return a Json value and should have instead just asked for a fully formated HTML form from the server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top