[Ingredients]
* A restdatasource with sparseupdates
* A form with two fields: name (with value 'aa') and street (with value 'cc')
[Recipe]
Submit the form and only update the field name, make sure the server returns the updated name field and field street with value null (some server logic changed the street field to null).
Now the street field is not updated and still displays 'cc'. When returning something else then null, the field does update.
[Investigation]
After the trip to the server SmartClient checks if the submitted value (undefined for street) is different from the returned server value (null). Because the == operator is used in the fieldValuesAreEqual method in ISC_Core.js@81421, it's conclussion is that it did not change.
[Suggestion]
Check with === or update the field if the field is specified in the response and wasn't submitted.
* A restdatasource with sparseupdates
* A form with two fields: name (with value 'aa') and street (with value 'cc')
[Recipe]
Submit the form and only update the field name, make sure the server returns the updated name field and field street with value null (some server logic changed the street field to null).
Now the street field is not updated and still displays 'cc'. When returning something else then null, the field does update.
[Investigation]
After the trip to the server SmartClient checks if the submitted value (undefined for street) is different from the returned server value (null). Because the == operator is used in the fieldValuesAreEqual method in ISC_Core.js@81421, it's conclussion is that it did not change.
[Suggestion]
Check with === or update the field if the field is specified in the response and wasn't submitted.
Comment