PDA

View Full Version : [FIXED] [2.0 Trunk] reused button in toolbar not shown



takayser
22 May 2009, 9:43 AM
If I add a button to a toolbar, it is shown as expected, if I remove this button and add it again, the button does not appear there.


public void onModuleLoad() {
final ContentPanel panel = new ContentPanel();
final ToolBar toolbar = new ToolBar();
final Button button = new Button("button");
panel.add(toolbar);
panel.add(new Button("on/off", new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
if (toolbar.getItems().contains(button)) {
toolbar.remove(button);
} else {
toolbar.add(button);
}
}
}));

Viewport v = new Viewport();
v.setLayout(new FitLayout());
v.add(panel);
RootPanel.get().add(v);
}

takayser
10 Jun 2009, 12:26 AM
sven, you fixed this issue 2 weeks ago, but one of the last commit from you (or darrell) did break it again:


[ERROR] Uncaught exception escaped
java.lang.AssertionError: The element may not be null
at com.extjs.gxt.ui.client.core.El.<init>(El.java:180)
at com.extjs.gxt.ui.client.core.El.getChild(El.java:889)
at com.extjs.gxt.ui.client.widget.layout.ToolBarLayout.onLayout(ToolBarLayout.java:318)
at com.extjs.gxt.ui.client.widget.Layout.layout(Layout.java:96)
at com.extjs.gxt.ui.client.widget.Container.doLayout(Container.java:348)

sven
10 Jun 2009, 3:33 AM
Fixed in SVN