#497 closed defect (fixed)
sortableTable does not display new rows after a parseData and render
Reported by: | Owned by: | anonymous | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.2 |
Keywords: | sortableTable parsedata | Cc: | |
Blocked By: | Blocking: |
Description
When you want to dynamically add rows into a sortableTable using JSON through .parseData followed by .render, none of the new rows get displayed in the table. e.g.
var w = dojo.widget.manager.getWidgetById("ProductListing?"); var j=dojo.json.evalJSON(JSONSTRINGGOESHERE);
w.parseData(j); w.render();
I have tracked down why (kind of) this is happening.
Issue seems to be with src/widget/html/sortableTable.js in the 'render' function where it goes: rebuild data and selection this.parseDataFromTable(body);
If you have used the .parseData function to add new rows with JSON string then these are completely removed by this .parseDataFromTable because the first thing it does is reset the .data array wiping out the newly added rows!
If you comment this line out then everything works fine but obviously rows are completely replaced rather than appended to (which is fine for me).
Thanks.
Change History (4)
comment:1 Changed 16 years ago by
severity: | blocker → critical |
---|
comment:2 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 16 years ago by
Milestone: | → 0.3release |
---|---|
Priority: | highest → normal |
severity: | critical → normal |
Version: | → 0.2 |
Fixed (duplicate). Call render with true (i.e. widget.render(true)) to not preserve state of HTML during render.