I picked up the 2010-10-01 nightly build from http://www.smartclient.com/builds/SmartGWT/2.x/LGPL
I noticed that my forms are broken. It seems FormItem.getValue() returns a null even though values have been entered. But if I call DynamicForm.getValue() and pass the name of the FormItem, the entered value is returned.
I've tried it with GWT 1.5.3 as well as GWT 2.0.4 - IE and Chrome browsers.
I've confirmed this happens with TextItem's and PasswordItem's - haven't tried the other FormItem classes. Here is the onModuleLoad() sample program that illustrates the problem:
I noticed that my forms are broken. It seems FormItem.getValue() returns a null even though values have been entered. But if I call DynamicForm.getValue() and pass the name of the FormItem, the entered value is returned.
I've tried it with GWT 1.5.3 as well as GWT 2.0.4 - IE and Chrome browsers.
I've confirmed this happens with TextItem's and PasswordItem's - haven't tried the other FormItem classes. Here is the onModuleLoad() sample program that illustrates the problem:
Code:
public void onModuleLoad() { final DynamicForm form = new DynamicForm(); final TextItem ti = new TextItem(); ti.setTitle("Name"); final PasswordItem pi = new PasswordItem(); pi.setTitle("Password"); form.setFields(ti, pi); form.setSaveOnEnter(true); form.addSubmitValuesHandler(new SubmitValuesHandler() { public void onSubmitValues(SubmitValuesEvent event) { String name1 = (String)ti.getValue(); String password1 = (String)pi.getValue(); String name2 = (String)form.getValue(ti.getName()); String password2 = (String)form.getValue(pi.getName()); SC.say("FormItem getValue()'s says name: " + name1 + ", password: " + password1 + "\nForm.getValue()'s says name: " + name2 + ", password: " + password2); } }); form.draw(); }
Comment