Hi Isomorphic,
I'm using SC_SNAPSHOT-2011-03-08/LGPL Deployment (built 2011-03-08).
I have a ListGrid connected with a DynamicForm (sharing the same RestDataSource) used for editing selected row (form.setData(record)).
Values are validated with a custom server-side validator.
The problem is that when in DynForm an improper value is provided and fails validation (formDataSource.updateData(formData) returns -4 status for some field) the improper value is saved somewhere in the form cache.
ListGrid, that is also connected to the same DataSource doesn't show this change. Selecting other rows and going back to the one that was edited and submited (validated) doesn't change anything, the validated (improper) value is loaded into the form.
I try to reset the form before loading it with row data, but the problem still exists.
My code:
RestDataSource
DynamicForm
Update submit button
Thanks in advance for your help.
I'm using SC_SNAPSHOT-2011-03-08/LGPL Deployment (built 2011-03-08).
I have a ListGrid connected with a DynamicForm (sharing the same RestDataSource) used for editing selected row (form.setData(record)).
Values are validated with a custom server-side validator.
The problem is that when in DynForm an improper value is provided and fails validation (formDataSource.updateData(formData) returns -4 status for some field) the improper value is saved somewhere in the form cache.
ListGrid, that is also connected to the same DataSource doesn't show this change. Selecting other rows and going back to the one that was edited and submited (validated) doesn't change anything, the validated (improper) value is loaded into the form.
I try to reset the form before loading it with row data, but the problem still exists.
My code:
RestDataSource
Code:
isc.RestDataSource.create({ dataURL:"/?someURL", dataFormat:"json", dataProtocol:"postParams", showPrompt: false, ID:"groupDS", useLocalValidators: false, fields:[ { type:"text", name:"name", title:"Example field causing problems", required: true}, .... other fields ]});
Code:
isc.DynamicForm.create({ ID: "groupEdit", dataSource: "groupDS", layoutAlign: "center", saveOperationType: "update", numCols: 5, colWidths: [ "20%", "30%", "20%", "10%", "20%"], width: "100%", height: 100, disableValidation: true, fields:[ { title:"Nazwa grupy", type:"text", name:"Example field causing problems", width:200 }, .... other fields ] });
Code:
click: function () { groupEdit.clearErrors(true); groupEdit.saveData(); }
Comment