View Full Version : to be notified by a event when the form is dirty

23 Oct 2010, 7:07 AM

I have a tab pannel in which I use differtent panels, and in the first I have a form.
I would like to change the title of this panel (in which I have the form) for example to add a '*' after the title or to change the color of the title when at least one field of the form has change.

I know that we can rely on the method isDirty() of the basicpanel, but I would like to handle that with event and not to request (with this method).

Whenever one field is change, I would like to have an event that fires this information.

Is this already existing ?
Or is there a way to simply do that ?

Thank you very much for your help.

23 Oct 2010, 8:11 AM
I agree that "state change" events like this are desirable.

validstatechange and dirtystatechange are needed.

You will have to either hook into the FormPanel's clientvalidation event (which fires repeeatedly if you configure it monitorValid: true)

Or bubble the change event from all added fields, and then listen for "change" at the FormPanel level.

24 Oct 2010, 12:31 PM
Thanks, i finally opted for bubling change event from all added fields to their owner form and works fine.