Hi,
After couple of hours of debugging I finally concluded that all fields which contains `dataPath` attribute will modify a ResultSet field immediately instead of placing edited values inside ListGrid._editSessions, and that`s why I cannot call ListGrid.saveAllEdits() it won`t recognize any changes, even in UI I can clearly see that edited item is in regular color (instead of blue).
Preconditions:
ListGrid.canEdit=true;
ListGrid.autoSaveEdits=false;
Example:
Actions:
1) click on the row and begin inline editing
2) change to some value '123456'
3) click ENTER
Postcondition:
value should be in blue color. But actually is in black color as before.
Reasoning:
I think FormItem component immediately changes a value reflected by `dataPath` and we cannot observe any value changes in ListGrid._storeEditValue(), because oldValue === newValue immediately.
Stack trace:
>>>> Here <<< field value with `dataPath` is now changed. And on fields without `dataPath` values is still not changed in this step (correct behavior).
Object.isc.ListGrid.addMethods.storeUpdatedEditorValue (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:50741:5)
at Object.isc.ListGrid.addMethods.getEditValue (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:49434:14)
at Object.isc.ListGrid.addMethods._saveAndHideEditor (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:51211:25)
at Object.isc.ListGrid.addMethods.cellEditEnd (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:50684:14)
at Object.isc.ListGrid.addProperties.editorKeyPress (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:28155:18)
at Object.isc.ListGrid.addProperties.editFormDefaults.itemKeyPress (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:27988:30)
Further ListGrid._storeEditValue() won't detect (return: false) that any fields that had changed so no values are stored in `_editSessions` .
I hope you'll figure out what I just had written, ask me if you need a more details about this situation.
Thank you.
Affected: all versions including SmartClient_v100p_2015-03-10_LGPL
After couple of hours of debugging I finally concluded that all fields which contains `dataPath` attribute will modify a ResultSet field immediately instead of placing edited values inside ListGrid._editSessions, and that`s why I cannot call ListGrid.saveAllEdits() it won`t recognize any changes, even in UI I can clearly see that edited item is in regular color (instead of blue).
Preconditions:
ListGrid.canEdit=true;
ListGrid.autoSaveEdits=false;
Example:
Code:
ListGrid.create({ fields: [ { title: 'Total Price', name: 'price', dataPath: 'total_price/amount', type: "float" } ] });
1) click on the row and begin inline editing
2) change to some value '123456'
3) click ENTER
Postcondition:
value should be in blue color. But actually is in black color as before.
Reasoning:
I think FormItem component immediately changes a value reflected by `dataPath` and we cannot observe any value changes in ListGrid._storeEditValue(), because oldValue === newValue immediately.
Stack trace:
>>>> Here <<< field value with `dataPath` is now changed. And on fields without `dataPath` values is still not changed in this step (correct behavior).
Object.isc.ListGrid.addMethods.storeUpdatedEditorValue (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:50741:5)
at Object.isc.ListGrid.addMethods.getEditValue (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:49434:14)
at Object.isc.ListGrid.addMethods._saveAndHideEditor (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:51211:25)
at Object.isc.ListGrid.addMethods.cellEditEnd (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:50684:14)
at Object.isc.ListGrid.addProperties.editorKeyPress (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:28155:18)
at Object.isc.ListGrid.addProperties.editFormDefaults.itemKeyPress (http://demo.dev/isomorphic/system/modules-debug/ISC_Grids.js:27988:30)
Further ListGrid._storeEditValue() won't detect (return: false) that any fields that had changed so no values are stored in `_editSessions` .
I hope you'll figure out what I just had written, ask me if you need a more details about this situation.
Thank you.
Affected: all versions including SmartClient_v100p_2015-03-10_LGPL
Comment