I've created a SmartGWT custom FormItem (by creating a child class CustomTextItem which extends com.smartgwt.client.widgets.form.fields.TextItem class), then I added an instance of CustomTextItem to some DynamicForm:
Now my problem is that I can't get the value of my customized object using getValue() method of the dynamic form:
The question is that where does form object retrieves its values on sumbittion or validation?
I think I should override some TextItem class method or set some property in order to do this.
Any idea?
Code:
... DynamicForm form = new DynamicForm(); form.setFields(new TextItem("text_field"), new CustomTextItem("custom_field")); ...
Code:
Object text_value = form.getValue("text_field"); <<< this is OK Object custom_value = form.getValue("custom_field"); <<< this always returns null
I think I should override some TextItem class method or set some property in order to do this.
Any idea?
Comment