Is there a direct way to check if there are "uncommitted" changes in an editable table? That is, if a user has entered info into the insert row and not pressed insert yet or edited an existing row but not pressed save. If the form is submitted, I would like to warn the user about changes/additions they may have intended which would not be saved.
RE: Trapping uncommitted table edits
There is not a single method that gives you this, but it is possible.
To check if a row is currently being edited, you can look at the hyf.editabletable.currentRowId property. This will be null unless a row is being edited.
To check if there is data that has not yet been inserted, you will need to check the values of each field. The IDs of the insert row fields will be of the form <repeat name>BlankEntry<field name>, so for the default Editable Table you could do something like:
if (hyf.editabletable.currentRowId != null) { alert('Please either discard or save row changes'); } if ((document.getElementById('EditableTableBlankEntrytable_field1').value != '') || (document.getElementById('EditableTableBlankEntrytable_field2').value != '')) { alert('Please insert the new record'); }
I hope this helps.
RE: Trapping uncommitted table edits