View Full Version : Ignore FormPanel input fields?

27 Sep 2013, 6:31 AM
I have a project that uses a FormPanel. A bunch of panels with controls are added to the FormPanel. On one of the panels, a combo box and a couple of fields are being ignored when isDirty is called on the FormPanel. I can't figure out how the code is making that happen. Is there a way to have form fields ignored when calling isDirty? Looking at the raw HTML it appears that these fields are part of the <form> tag. The components are added to a ContentPanel that is added (eventually) to the FormPanel.

27 Sep 2013, 8:33 AM
Looks like my project is using Ext GWT version 2.2.1. Can an admin move this message to the correct forum?

Colin Alworth
30 Sep 2013, 8:07 AM
Moved - be aware that 2.2.1 is several years old, and likely has many bugs that have been fixed by newer versions.

I'm not sure I understand the question - do you *want* the fields to be ignored, or do you want the panel to pay attention to those fields? If they are being ignored by the FormPanel methods, the cause is likely that they are wrapped inside another container which is inside the FormPanel - by default in GXT 2 the FormPanel doesn't ask anything other than its direct children about validity or dirty values.

30 Sep 2013, 10:55 AM
Thanks for moving the thread.

In a nut shell, I want to add a HorizontalPanel with a ComboBox to a FormPanel and have changes to the ComboBox ignored when the FormPanel's isDirty method is called. If there is an easy way to accomplish that, please let me know.


31 Oct 2013, 7:27 AM
Can't you just override the ComboBox's isDirty() method to always return false?

4 Nov 2013, 9:18 AM
Overriding the isDirty method for fields I want to ignore works.