View Full Version : Gwt AbsolutePanel
RDomingo
1 Sep 2008, 12:05 AM
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);
}
}
evant
1 Sep 2008, 12:09 AM
Because you posted in the wrong forum! Moving to GXT forums.
gslender
1 Sep 2008, 7:38 PM
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 ;-)
RDomingo
1 Sep 2008, 11:57 PM
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
RDomingo
2 Sep 2008, 12:02 AM
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 ??
gslender
2 Sep 2008, 2:13 AM
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.
RDomingo
2 Sep 2008, 2:34 AM
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).
publicclass 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);
}
}
gslender
2 Sep 2008, 2:35 AM
ensure the layoutcontainer is appropriately sized -ie setSize(200,500);
RDomingo
2 Sep 2008, 3:02 AM
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);
}
}
RDomingo
2 Sep 2008, 3:07 AM
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
arothe
16 Sep 2008, 11:55 AM
Hi,
my first contact with GWT and Ext-GWT...and it doesn't work for my task. It is very strange to create an instance of AbsoluteData and then set the coordinates with two setter methods. The next I saw, all widgets are painted at 0,0 - so the framework is currently not suitable for me. :-?
I found a related thread on http://yui-ext.com/forum/showthread.php?p=214281 but it seems, the problems aren't solved in the current version.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.