maries
4 Jul 2009, 3:08 AM
Popup Menus are not displayed correctly after the menu contents is rebuilt.
Only the first menu item is shown when button is pressed the first time.
It works fine with gxt 1.2.3
Tested with FF3.5, IE7 & hosted mode, WinXP
GXT 2.0rc2
GWT 1.6.4
Thanks
public class Test implements EntryPoint {
Menu menu;
public void onModuleLoad() {
final Timer t = new Timer() {
public void run() {
menu.removeAll();
for (int i = 0; i < 5; i++ ) {
menu.add(new MenuItem("menu item "+i));
}
}
};
Button btn = new Button();
btn.setText("Press Me");
menu = new Menu() {
protected void onShow() {
super.onShow();
t.schedule(500);
}
};
menu.add(new MenuItem("..."));
btn.setMenu(menu);
RootPanel.get().add(btn);
}
}
Only the first menu item is shown when button is pressed the first time.
It works fine with gxt 1.2.3
Tested with FF3.5, IE7 & hosted mode, WinXP
GXT 2.0rc2
GWT 1.6.4
Thanks
public class Test implements EntryPoint {
Menu menu;
public void onModuleLoad() {
final Timer t = new Timer() {
public void run() {
menu.removeAll();
for (int i = 0; i < 5; i++ ) {
menu.add(new MenuItem("menu item "+i));
}
}
};
Button btn = new Button();
btn.setText("Press Me");
menu = new Menu() {
protected void onShow() {
super.onShow();
t.schedule(500);
}
};
menu.add(new MenuItem("..."));
btn.setMenu(menu);
RootPanel.get().add(btn);
}
}