1. #1
    Sencha User
    Join Date
    Jul 2008
    Posts
    7
    Vote Rating
    0
    RDomingo is on a distinguished road

      0  

    Default Gwt AbsolutePanel

    Gwt AbsolutePanel


    Can anyone please explain why TextField (field1 and field2) are not layouted according to my coordinates ? (They will appear behind eachother as in a flow layout)

    When I use the TextBox layout will occur as expected. (They are layout below each other, as described by the coordinates)




    public
    class App implements EntryPoint {


    publicvoid onModuleLoad() {



    RootPanel rootPanel = RootPanel.get();



    AbsolutePanel absolutePanel = new AbsolutePanel();

    rootPanel.add(absolutePanel);






    // TextBox field1 = new TextBox();

    TextField field1 =




    new TextField();

    absolutePanel.add(field1, 10, 10);




    // TextBox field2 = new TextBox();

    TextField field2 =




    new TextField();

    absolutePanel.add(field2, 10, 40);

    }
    }

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,169
    Vote Rating
    674
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Because you posted in the wrong forum! Moving to GXT forums.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    Even worse, I think the question is about GWT-Ext and not ExtGWT so not only a wrong post in the wrong forum, but wrong site as well ;-)

  4. #4
    Sencha User
    Join Date
    Jul 2008
    Posts
    7
    Vote Rating
    0
    RDomingo is on a distinguished road

      0  

    Default


    Hi Evant,

    Sorry for posting to wrong forum, sometimes I get lost in all terms extjs / gwt / gxt / extgwt ...
    And I didn't had my first cup of coffee

    Raymond

  5. #5
    Sencha User
    Join Date
    Jul 2008
    Posts
    7
    Vote Rating
    0
    RDomingo is on a distinguished road

      0  

    Default


    Hi Gslender,

    I agree with evant moving my post to this forum.

    As I wrote in my original post for gwt everyting is ok, the problem seems to occur only when using GXT components.

    Have you or anyone else using gxt any idea why gxt TextField doesn't layout same way as TextBox ??

    Is it a BUG, isn't AbsoluteLayout supported by gxt, isn't anybody using the AbsolutePanel or am I missing something ??

  6. #6
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    Sorry about that RDomingo, as gxt doesn't have an AbsolutePanel I assumed you were talking about GWT-Ext, but alas you were talking about the GWT AbsolutePanel.

    In any case, why not use a LayoutContainer and an AbsoluteLayout as apposed to using the GWT layouts.

    Whilst things should work, you'll save yourself a lot of trouble if you stick the the same base UI provider... support is easier that way.

  7. #7
    Sencha User
    Join Date
    Jul 2008
    Posts
    7
    Vote Rating
    0
    RDomingo is on a distinguished road

      0  

    Default


    Thank you for looking in to my little problem. This could just be the info I needed

    But it looks like it is not working. When I run code below, I expect to (gxt) text fields to show up below eachother. But they are layedout behind each other (like flowlayout).

    public
    class App extends LayoutContainer implements EntryPoint {


    publicvoid onModuleLoad() {
    RootPanel.get().add(
    this);
    }


    public App() {
    super();
    setLayout(
    new AbsoluteLayout());


    TextField<String> field1 =
    new TextField<String>();
    AbsoluteData data1 =
    new AbsoluteData();
    data1.setX(10);
    data1.setY(10);
    add(field1, data1);


    TextField<String> field2 =
    new TextField<String>();
    AbsoluteData data2 =
    new AbsoluteData();
    data2.setX(10);
    data2.setY(100);
    add(field2, data2);
    }

    }

  8. #8
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    ensure the layoutcontainer is appropriately sized -ie setSize(200,500);

  9. #9
    Sencha User
    Join Date
    Jul 2008
    Posts
    7
    Vote Rating
    0
    RDomingo is on a distinguished road

      0  

    Default


    Currently it is only showing the last field I added.

    So still no luck, is it working for you ?
    Could it be my version of gxt (some recent version from svn/cvs) ?


    public
    class App extends LayoutContainer implements EntryPoint {


    publicvoid onModuleLoad() {
    RootPanel.get().add(this);
    }


    public App() {
    super();
    setLayout(new AbsoluteLayout());
    setSize(200,500); // added size

    TextField<String> field1 = new TextField<String>();
    field1.setValue("field1");
    AbsoluteData data1 = new AbsoluteData();
    data1.setX(10);
    data1.setY(10);
    add(field1, data1);


    TextField<String> field2 = new TextField<String>();
    field2.setValue("field2");
    AbsoluteData data2 = new AbsoluteData();
    data2.setX(50);
    data2.setY(10);
    add(field2, data2);
    }
    }


  10. #10
    Sencha User
    Join Date
    Jul 2008
    Posts
    7
    Vote Rating
    0
    RDomingo is on a distinguished road

      0  

    Default


    It looks like it has to do with the version of GXT, maybe it's a bug.

    Because when I use:
    1.0.1

    I See two fields like flowlayout

    When I use version 1.1 recent from svn/cvs:
    I see just one field

Thread Participants: 3