Hi
On DynamicForm I have SelectItem for Department name:
the clearPicker defined as
Almost everything works fine. But when record had Department defined and then it was removed by using clearPicker I can't save this record with new (null) value for idDepartment field.
the request that I can see in transformRequest looks like this:
So field "idDepartment" is present in "oldValues" section and absent in "data".
I also noticed that when I delete date from DateItem defined on the same DynamicForm the request looks like
field "date" is present in "data" section and absent in "oldValues".
It was tested on SmartGWT LGPL 2.3 and 2.4
Is it correct behavior for request's "data" and "oldValues" lists?
On DynamicForm I have SelectItem for Department name:
Code:
final SelectItem itemDepartment = new SelectItem("idDepartment"); itemDepartment.setTitle("Department"); itemDepartment.setOptionDataSource(DepartmentDataSource.getInstance()); itemDepartment.setValueField("id"); itemDepartment.setDisplayField("depName"); itemDepartment.setIcons(clearPicker);
Code:
PickerIcon clearPicker = new PickerIcon(PickerIcon.CLEAR, new FormItemClickHandler() { public void onFormItemClick(FormItemIconClickEvent event) { event.getItem().clearValue(); } });
the request that I can see in transformRequest looks like this:
Code:
request.getJsObj(): { ... "data":{ "id":16, "date":"2011-01-23T23:00:00", "description":"test description" }, ... "oldValues":{ "id":16, "idDepartment":10, "date":"2011-01-23T23:00:00", "description":"test description" }, ...
I also noticed that when I delete date from DateItem defined on the same DynamicForm the request looks like
Code:
request.getJsObj(): { ... "data":{ "id":16, "date":null, "description":"test description" }, ... "oldValues":{ "id":16, "description":"test description" }, ...
It was tested on SmartGWT LGPL 2.3 and 2.4
Is it correct behavior for request's "data" and "oldValues" lists?
Comment