Hi,
When calling the DatasourceField.setEditorType(), it is not proper being applied to the ListGrid and DynamicForm fields that are bind to the DataSource field.
This issue just happens when setting a FormItem that has some custom properties (like some added event handlers) as the editor type of the DatasourceField. The type of the editor is being applied but the customized actions are not being applied to the ListGridField.
Looking at the SmartGwt code (release 1.1), I checked that the ListGridField.setEditorType does the following:
setAttribute("editorType", editorType.getType());
JavaScriptObject editorConfig = editorType.getConfig();
setAttribute("editorProperties", editorConfig);
while the DataSourceField.setEditorType, only does:
setAttribute("editorType", editorType.getType());
So, isn’t the DomainDataSource.setEditorType() missing the “editorProperties” attribute to be set?
If i manually set the “editorProperties” of the DataSourceField, then all editor properties are being propagated to the ListGridField, and when editing the record on the Grid, it works fine (i.e., it considers the handlers)
...
v_dataSourceField.setEditorType(v_editorType);
JavaScriptObject v_editorConfig = v_editorType.getConfig();
v_dataSourceField.setAttribute("editorProperties", v_ditorConfig);
...
Is this really a BUG or I have to do something else to get the ListGrid proper using the DataSource defined EditorTypes?
Regards,
Cerávolo