-
24 Dec 2012 5:28 AM #1
Adding same widget twice to TabPanel bug
Adding same widget twice to TabPanel bug
Required Information
Version(s) of Ext GWT
3.0.0.1
Browser versions and OS
(and desktop environment, if applicable)
Firefox 17, Windows 7
Virtual Machine
Yes
Description
Additional tab appears. Clicking on it causes IndexOutOfBoundsException be thrown.
Run mode
Development mode
Steps to reproduce the problem
Start running in development mode in Eclipse
Open app in browser
Click the tab number 3
Expected result
There should be only 1 tab.
Actual result
An exception appears in the development mode console.
Test case
Code:
public void onModuleLoad() {
final TabPanel advanced = new TabPanel();
advanced.setAnimScroll(true);
advanced.setCloseContextMenu(true);
advanced.setBodyBorder(true);
Label l2=new Label("2");
advanced.add(l2,new TabItemConfig("2",true));
advanced.add(l2,new TabItemConfig("3",true));
Viewport viewport = new Viewport();
viewport.add(advanced);
RootPanel.get().add(viewport);
}
Helpful Information
Screenshot or video
«Link to attachment»
Live test
«http://… Address for a test case for this bug on a running server»
Debugging already done
«none»
Possible fix
«Not provided»
-
26 Dec 2012 9:39 AM #2
Thanks for the report - I've confirmed this issue, and will update this post when we have a fix committed.
Interestingly, invoking l2.removeFromParent() does not fix this, but advanced.remove(l2) does. This is probably the best workaround for now, to explicitly remove the child from the previous parent.
You found a bug! We've classified it as
EXTGWT-2721
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote