msauter
16 Oct 2009, 6:46 AM
I have a FormPanel (which has binded textfields) with a binding to a Model, like this:
FormPanel formPanel = new FormPanel();
FormBinding binding = new FormBinding(formPanel);
Here is the code of a Textfield:
TextField<String> textField = new TextField<String>();
textField.setAllowBlank(true);
textField.setFieldLabel(fieldLabel);
textField.setReadOnly(false);
binding.addFieldBinding(new FieldBinding(textField, fieldName));
Now i want to insert a Model which has properties set:
binding.bind(getDomainModelData());
Now the textfields of my formpanel are updated, i see all the data from the delievered Model. This is fine. The problem is, formpanel.isDirty is now set to true. How can i set isDirty to false so that it should only change to true, when the user make changes to the shown data from the model?
FormPanel formPanel = new FormPanel();
FormBinding binding = new FormBinding(formPanel);
Here is the code of a Textfield:
TextField<String> textField = new TextField<String>();
textField.setAllowBlank(true);
textField.setFieldLabel(fieldLabel);
textField.setReadOnly(false);
binding.addFieldBinding(new FieldBinding(textField, fieldName));
Now i want to insert a Model which has properties set:
binding.bind(getDomainModelData());
Now the textfields of my formpanel are updated, i see all the data from the delievered Model. This is fine. The problem is, formpanel.isDirty is now set to true. How can i set isDirty to false so that it should only change to true, when the user make changes to the shown data from the model?