View Full Version : FormPanel isDirty problem

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>();
binding.addFieldBinding(new FieldBinding(textField, fieldName));

Now i want to insert a Model which has properties set:


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?

16 Oct 2009, 8:57 AM
Form is dirty, because you changed the model, so the forms values has changed. This is the appropriate behaviour.

Here you can find a solution: http://www.extjs.com/forum/showthread.php?p=398912#post398912