Hi,
I'm putting some initial values in a form,
call rememberValues()
then change the item on screen (user input)
then do a resetValues() which should revert to the initial values, right?
When I hit my button, the item isn't being reset anymore.
SmartClient Version: SC_SNAPSHOT-2012-01-15_v8.3d/Pro Deployment (built 2012-01-15)
thanks,
I'm putting some initial values in a form,
call rememberValues()
then change the item on screen (user input)
then do a resetValues() which should revert to the initial values, right?
When I hit my button, the item isn't being reset anymore.
Code:
public void test17() { final DynamicForm form = new DynamicForm(); TextItem f1 = new TextItem(); f1.setName("remember"); form.setFields(f1); Map initialValues = new LinkedHashMap(); initialValues.put("remember", "me"); form.editNewRecord(initialValues); form.rememberValues(); Button reset = new Button("Reset Values"); reset.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { form.reset(); form.resetValues(); form.clearErrors(true); } }); VLayout layout = new VLayout(); layout.setWidth100(); layout.setHeight(600); layout.setMembers(form, reset); masterPanel.addChild(layout); }
SmartClient Version: SC_SNAPSHOT-2012-01-15_v8.3d/Pro Deployment (built 2012-01-15)
thanks,
Comment