Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: [FIXED] [1.2] IE MultiField wrongly rendered

  1. #1

    Exclamation [FIXED] [1.2] IE MultiField wrongly rendered

    When I put the MultiField<LabelField> into LayoutContainer and then another MultiField<Field> into the same LayoutContainer and then the container into a FieldSet the second MultiField is being rendered imporoperly - it is rendered about one row too low. Everything is OK, when I click any Field in the second MultiField. Here's sample code and screenshot:

    Code:
    FieldSet fieldSet = new FieldSet();
    fieldSet.setCollapsible(true);
            LayoutContainer firstRowContainer= new LayoutContainer();
            LabelField label1= new LabelField();
            label1.setWidth(100);
            label1.setText("LABEL1");
            LabelField label2= new LabelField();
            label2.setWidth(100);
            label2.setText("LABEL2");
            MultiField<Field> fieldFieldRow = new MultiField<Field>();
            fieldFieldRow.setOrientation(Orientation.HORIZONTAL);
            fieldFieldRow.setSpacing(20);
    DateField dateField = new DateField();
            dateField.setWidth(100);
            dateField.setAllowBlank(false);
            TextField<String> textField= new TextField<String>();
            textField.setWidth(100);
            labelFieldRow.add(label1);
            labelFieldRow.add(label2);
            fieldFieldRow.add(dateField);
            fieldFieldRow.add(textField);
            firstRowContainer.add(labelFieldRow);
            firstRowContainer.add(fieldFieldRow);
            fieldSet.add(firstRowContainer);
    This is simple example of my code and in the attachement there is screenshot. On the screenshot you can see another bug. When I start modal window in IE or FF that is not maximized it sets modal mask only for size of the IE/FF window. After maximization modal mask doesn't change its size and I can click on components that should have been covered by modal mask.
    Attached Images Attached Images

  2. #2
    Ext User
    Join Date
    Oct 2008
    Location
    Warsaw(PL)/Cottbus(GER)
    Posts
    215

    Default

    I think your problem is only that u have to add a layout to the FieldSet.
    In your code i can not find some layout set.

    Check examples:

    Code:
    FormLayout layout = new FormLayout();  
    layout.setLabelWidth(75);  
    layout.setPadding(4);  
    fieldSet.setLayout(layout);
    Without a layout this will happen to every form (has nothing to do with the multifield). This is what i have experienced.

    Note: each Fieldset needs a new Layout

  3. #3

    Exclamation

    I've just noticed, that in FF there's a problem with LabelFields. Image in attachement Text is slightly moved to the right (just like few more pixels where added to every single space between fields). There's a problem with FieldSet as well - right margin is not properly set (it is OK in IE as you can see in the previous jpg file). EDIT: I think, that the bug with FieldSet is the result of the LabelField bug - the fifth Label Field is moved to the right and due to its spacing the FieldSet margin is outside of the content panel.
    Attached Images Attached Images

  4. #4
    Ext User
    Join Date
    Oct 2008
    Location
    Warsaw(PL)/Cottbus(GER)
    Posts
    215

    Default

    Quote Originally Posted by mwojciechowski View Post
    I've just noticed, that in FF there's a problem with LabelFields. Image in attachement Text is slightly moved to the right (just like few more pixels where added to every single space between fields). There's a problem with FieldSet as well - right margin is not properly set (it is OK in IE as you can see in the previous jpg file). EDIT: I think, that the bug with FieldSet is the result of the LabelField bug - the fifth Label Field is moved to the right and due to its spacing the FieldSet margin is outside of the content panel.
    Ok i see. This similar problem i had as well. Did you tried to set a FormLayout to the FieldSet?
    Using Forms can create a lot strange behaviours. It is quite hard to succeed sometimes. Iam facing all the time problems with the layout. It is a bit annoying me (the Form work )

  5. #5

    Exclamation

    I can not use FormLayout - I need different widths of the fields. In FormLayout every Field has the same width. Another thing is, that in FormLayout I will have ONLY ONE(!) FieldLabel (from MultiField) and as you can see I need 5 different.

    I had tried to add FlowLayout and RowLayout to the FieldSet - it looks the same. It is a bug in GXT (IE), because all TextFields and DataFields works fine in FF. FF bug is only with labelfields.

    PS If you face a bug (like the LabelField in FF as you said) report it - the sooner you report the bug the sooner we get better GXT

  6. #6

    Arrow

    I tried to use MultieField and obtain the same problem. Please fix it, especially because in FF it works fine. The problem is, that MultiField doesn't refresh its Fields in IE.

  7. #7

    Question

    Anything about this problem? Is it resolved, or you're still working on it?

  8. #8
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572

    Default

    pls post some code as per the forum guidelines - ie some test that demostrates the bug/error

  9. #9

    Lightbulb

    Thank you for interest Grant. Here's the code (it is simply almost the same as I posted above, but now in ContentPanel and with labelFieldRow, that I had forgotten).

    Code:
            ContentPanel cp = new ContentPanel();
            FieldSet fieldSet = new FieldSet();
            fieldSet.setCollapsible(true);
                    LayoutContainer firstRowContainer= new LayoutContainer();
                    LabelField label1= new LabelField();
                    label1.setWidth(100);
                    label1.setText("LABEL1");
                    LabelField label2= new LabelField();
                    label2.setWidth(100);
                    label2.setText("LABEL2");
                    MultiField<Field> labelFieldRow = new MultiField<Field>();
                    labelFieldRow.setOrientation(Orientation.HORIZONTAL);
                    labelFieldRow.setSpacing(20);
                    MultiField<Field> fieldFieldRow = new MultiField<Field>();
                    fieldFieldRow.setOrientation(Orientation.HORIZONTAL);
                    fieldFieldRow.setSpacing(20);
            DateField dateField = new DateField();
                    dateField.setWidth(100);
                    dateField.setAllowBlank(false);
                    TextField<String> textField= new TextField<String>();
                    textField.setWidth(100);
                    labelFieldRow.add(label1);
                    labelFieldRow.add(label2);
                    fieldFieldRow.add(dateField);
                    fieldFieldRow.add(textField);
                    firstRowContainer.add(labelFieldRow);
                    firstRowContainer.add(fieldFieldRow);
                    fieldSet.add(firstRowContainer);
                    cp.add(fieldSet);
            RootPanel.get().add(cp);
    The result print screens are in the attachements (IE for IE7 and FF for FireFox). As you can see (or rather you can not ) in IE TextFields are missing and they show themselves after collapsing and expanding FieldSet. When they finally are being rendered Labels are above the TextFields and they are in the same vertical line. Unfortunately in FireFox Labels are slightly moved to the right (that is annoying especially when I put 5 or more fields in one row - every Label for Field is moved few pixels to the right) , but there is no problem with missing TextFields (hurray! ).

    Please help me because using MultiField in this way would make creating Forms easier and faster (I wouldn't have to use Column/TableLayout with FormPanel for every field in the row).
    Attached Images Attached Images

  10. #10
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572

    Default

    you haven't defined any layouts in the all the containers?? - this means all containers are using FlowLayout, and so I'm not surprised the layout is behaving in an undefined way - flowlayout just uses normal browser flow.

    if you expect/want a particular layout behaviour then you'll need to define/set an appropriate layout

    also, I note you've not sized the MultiField, so in effect you are letting the children size the parent containers, and this rarely works out correctly.

    all in all, the approach is wrong. you should really start by defining a correct layout that will size/position the child widgets correctly.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •