Editor empty joined table: populating joined row select list/check boxes before getting rows of data
Editor empty joined table: populating joined row select list/check boxes before getting rows of data
EDIT: My mistake. See my reply below.
---
Editor with joined tables does not seem to support inserting new rows on empty tables.
For example, I have a table with check boxes to select equipment. When starting from a newly created table, the editor form where the check boxes normally go is empty -- not even empty checkboxes. This is probably because the JSON which informs Editor of the available values is not sent until rows of data are sent -- at least, that's how it looks in the joined table example. I'm not sure I'd call this a bug, but it's not what I'd call expected behavior (all other fields work fine).
Workarounds: I suspect some initializing JSON could be sent to the editor with empty row data, or if the table isn't actually empty (just the Datatable), some rows can be sent when the data table is initialized.
(This is unrelated to my recent post about empty select boxes)
---
Editor with joined tables does not seem to support inserting new rows on empty tables.
For example, I have a table with check boxes to select equipment. When starting from a newly created table, the editor form where the check boxes normally go is empty -- not even empty checkboxes. This is probably because the JSON which informs Editor of the available values is not sent until rows of data are sent -- at least, that's how it looks in the joined table example. I'm not sure I'd call this a bug, but it's not what I'd call expected behavior (all other fields work fine).
Workarounds: I suspect some initializing JSON could be sent to the editor with empty row data, or if the table isn't actually empty (just the Datatable), some rows can be sent when the data table is initialized.
(This is unrelated to my recent post about empty select boxes)
This discussion has been closed.
Replies
Allan
Upon further analysis, I made the simplifying assumption that there was no need to get the joined table contents ("access" object in the joined example) without also getting the items from that object used by each row (the value/label stuff in aaData).
Because of my design, unless rows of data were sent, the available values for joined fields were not.
I was pretty tired last night -- 15 hour day -- so wasn't thinking clearly. My apologies for assuming this was a problem with DataTables and not my own code.
Allan