Hi there!

Maybe someone can help me: I have a Login page which sends me to another
page that contains the TabbedPanel.

What I need is to show the contents of the first tab (as if it was the user
Home page) when the TabbedPanel page loads..but that's not happening,
because I couldn't find how to set that first tab as the "active" tab..I
tried setSelectedTab(0) but it didn't work - I always need to select the tab
before it's contents show. 


Here's some code:____________________________________________________


---BasePage--  page that contains the TabbedPanel and is called by the
LoginPage onSubmit()
    
    ...
    public BasePage() {
        setModel(new Model("tabpanel"));
        List tabs = new ArrayList();

        tabs.add(new AbstractTab(new Model("Home")){
            public Panel getPanel(String panelId){
                return new TabPanel1(panelId, userId); //userId is the
TabPanel1 content (a Label)
            }
        });
        tabs.add(new AbstractTab(new Model("Users")){
            public Panel getPanel(String panelId){   
                return new TabPanel2(panelId);
            }
        });
      
      TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);
      tabbedPanel.setSelectedTab(0);
      add(tabbedPanel);
      ...



---LoginPage----------------------

...  
if(authenticate...){
      BasePage basePage = new BasePage();
      basePage.setUserId(userIdIn); //value to pass to the TabPanel1 Label 
      setResponsePage(basePage);
}
...
____________________________________________________

Hope I explained well ._.

Thanks, Edd
-- 
View this message in context: 
http://www.nabble.com/TabbedPanel---select-which-tab-to-show-when-page-loads-tf3765927.html#a10646171
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to