inovelan
12 Mar 2009, 7:01 AM
Hello,
Please watch this code :
public class Test implements EntryPoint {
public void onModuleLoad() {
Window w = new Window();
w.setLayout(new RowLayout());
//Work
lc1 = new LayoutContainer();
lc1.setVisible(false);
lc1.setLayout(new FormLayout());
DateField df1 = new DateField();
df1.setFieldLabel("Date 1");
lc1.add(df1, new FormData());
w.add(lc1, new RowData(-1,-1));
//Doesn't Work
lc2 = new LayoutContainer();
lc2.setVisible(false);
lc2.setLayout(new RowLayout());
LayoutContainer lc2b = new LayoutContainer();
lc2b.setLayout(new FormLayout());
DateField df2 = new DateField();
df2.setFieldLabel("Date 2");
lc2b.add(df2, new FormData());
lc2.add(lc2b, new RowData(-1,-1));
w.add(lc2, new RowData(-1,-1));
//Button
Button btn = new Button("Visible/Invisible");
btn.addSelectionListener(new SelectionListener<ButtonEvent>(){
public void componentSelected(ButtonEvent ce)
{
lc1.setVisible(!lc1.isVisible());
lc2.setVisible(!lc2.isVisible());
}
});
w.add(btn, new RowData(-1,-1));
w.show();
}
}When I click on the "btn" Button DateFields "df1" and "df2" become visible but I can't click on "df2"'s trigger button.
I do something wrong or it's a bug?
Thank you
Gxt 1.2.3
Gwt 1.5.3
Firefox 3.0.6
web mode
Ubuntu 8.10
Please watch this code :
public class Test implements EntryPoint {
public void onModuleLoad() {
Window w = new Window();
w.setLayout(new RowLayout());
//Work
lc1 = new LayoutContainer();
lc1.setVisible(false);
lc1.setLayout(new FormLayout());
DateField df1 = new DateField();
df1.setFieldLabel("Date 1");
lc1.add(df1, new FormData());
w.add(lc1, new RowData(-1,-1));
//Doesn't Work
lc2 = new LayoutContainer();
lc2.setVisible(false);
lc2.setLayout(new RowLayout());
LayoutContainer lc2b = new LayoutContainer();
lc2b.setLayout(new FormLayout());
DateField df2 = new DateField();
df2.setFieldLabel("Date 2");
lc2b.add(df2, new FormData());
lc2.add(lc2b, new RowData(-1,-1));
w.add(lc2, new RowData(-1,-1));
//Button
Button btn = new Button("Visible/Invisible");
btn.addSelectionListener(new SelectionListener<ButtonEvent>(){
public void componentSelected(ButtonEvent ce)
{
lc1.setVisible(!lc1.isVisible());
lc2.setVisible(!lc2.isVisible());
}
});
w.add(btn, new RowData(-1,-1));
w.show();
}
}When I click on the "btn" Button DateFields "df1" and "df2" become visible but I can't click on "df2"'s trigger button.
I do something wrong or it's a bug?
Thank you
Gxt 1.2.3
Gwt 1.5.3
Firefox 3.0.6
web mode
Ubuntu 8.10