1. #1
    Sencha User cyChop's Avatar
    Join Date
    Jun 2010
    Location
    Metz, France
    Posts
    59
    Vote Rating
    0
    cyChop is on a distinguished road

      0  

    Default Answered: Forms and IE compatibility

    Answered: Forms and IE compatibility


    Hello there! Long time, no see! And as usual, I only come with a matter in hand. How rude of me!

    To cut it short, we had problems to make our application work in IE8. I came accross this post which seems to describe exactly our problem: http://www.sencha.com/forum/showthre...on-Error-In-IE

    From what I gathered, it is impossible to add forms (FormPanel) into forms and have it work inside IE (though it just looks great inside Chrome and FireFox). We do that in our application to have dynamic forms: to change fields according to a combo value, we remove the nested form and add a new one with appropriate fields.

    So here I am: am I really doing distasteful things? If yes, what is the better way you could propose? If no, what should I change to make it work inside IE? Of course, I would be glad if you had a solution both respecting best-practices and allowing me to adapt with few work.

    Thanks a lot!

    GWT 2.1.1
    GXT 2.1

  2. The initial question i would have is why are you using a FormPanel? The only extra you gain from using a FormPanel is that you could do a normal http form submit. If you do not require that, you can archieve the same using a ContentPanel with a FormLayout.

    When using ContentPanels, you would not run into the problem that you are nesting multiple form tags into each other.

  3. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    The initial question i would have is why are you using a FormPanel? The only extra you gain from using a FormPanel is that you could do a normal http form submit. If you do not require that, you can archieve the same using a ContentPanel with a FormLayout.

    When using ContentPanels, you would not run into the problem that you are nesting multiple form tags into each other.

  4. #3
    Sencha User cyChop's Avatar
    Join Date
    Jun 2010
    Location
    Metz, France
    Posts
    59
    Vote Rating
    0
    cyChop is on a distinguished road

      0  

    Default


    From a layout point of view, this is totally right indeed, and though I did not think of it today, I have done this elsewhere in the application. In this particular case, I do use the submit method but this is more because it was available than because I needed it.

    What I am really interested in here are the getFields() and clear() methods. However, reimplementing them would not be too much of a hassle to keep clear from IE's limitations. This is a lead I will investigate further.

    As usual, you're reactive and good advice, sven!

  5. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You can almost copy and paste those methods. In GXT 3 we simple copied them into a helper class, so you can use them with any container.

  6. #5
    Sencha User cyChop's Avatar
    Join Date
    Jun 2010
    Location
    Metz, France
    Posts
    59
    Vote Rating
    0
    cyChop is on a distinguished road

      0  

    Default Thanks!

    Thanks!


    Just a word to confirm that everything works fine by using ContentPanels. I created a Helper class just as you suggested but had to duplicate the FormButtonBinding to make it work with the new structure. Tanks a lot, sven!

Thread Participants: 1