1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    6
    Vote Rating
    0
    cpreisler is on a distinguished road

      0  

    Default Answered: Ignore FormPanel input fields?

    Answered: Ignore FormPanel input fields?


    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.

  2. Can't you just override the ComboBox's isDirty() method to always return false?

  3. #2
    Sencha User
    Join Date
    Sep 2013
    Posts
    6
    Vote Rating
    0
    cpreisler is on a distinguished road

      0  

    Default Move to 2.x forum

    Move to 2.x forum


    Looks like my project is using Ext GWT version 2.2.1. Can an admin move this message to the correct forum?

  4. #3
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Answers
    109
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    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.

  5. #4
    Sencha User
    Join Date
    Sep 2013
    Posts
    6
    Vote Rating
    0
    cpreisler is on a distinguished road

      0  

    Default


    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.

    Thanks!

  6. #5
    Sencha Premium Member
    Join Date
    Mar 2010
    Posts
    31
    Answers
    3
    Vote Rating
    0
    MalcolmDavis is on a distinguished road

      0  

    Default


    Can't you just override the ComboBox's isDirty() method to always return false?

  7. #6
    Sencha User
    Join Date
    Sep 2013
    Posts
    6
    Vote Rating
    0
    cpreisler is on a distinguished road

      0  

    Default


    Overriding the isDirty method for fields I want to ignore works.

Thread Participants: 2