Results 1 to 2 of 2

Thread: Adding same widget twice to TabPanel bug

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-2721 in internal.
  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    1
    Vote Rating
    0
      0  

    Default 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

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •