I have 2 different behaviours for the dynamicForm.valuesHaveChanged.
My testcase:
If I change the value with
or
the df.valuesHaveChanged() returns true.
If I change the value with
then df.valuesHaveChanged returns false.
Is this a correct behaviour? It is not consistent...
Using Smartgwt v9.1p_2014-08-19 Power edition.
My testcase:
Code:
public void onModuleLoad() {
final DynamicForm df = new DynamicForm();
final TextItem item = new TextItem("mytextitem");
df.setItems(item);
VLayout vlayout = new VLayout();
vlayout.addMember(df);
IButton button = new IButton("Click me");
button.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
//item.setValue("new value");
//Map<String,Object> values = new HashMap<String,Object>();
//values.put("mytextitem", "new value");
df.setValue("mytextitem", "new value");
SC.say("Values have changed: " + df.valuesHaveChanged());
}
});
vlayout.addMember(button);
vlayout.draw();
}Code:
df.setValue("mytextitem", "new value");Code:
item.setValue("new value");If I change the value with
Code:
Map<String,Object> values = new HashMap<String,Object>();
values.put("mytextitem", "new value");Is this a correct behaviour? It is not consistent...
Using Smartgwt v9.1p_2014-08-19 Power edition.