Thanks Igor .... I guess I was a little mixed up. So ... now I've got 3 tabs (each with a list of BookmarkablePageLinks....sort of a submenu) When you click on a BookmarkablePageLink it loads the correct panel into the body of the main page. All of that is great except .... when I click on a submenu item of a tab (other than the first one) the tabbedpanel always reverts back to the first tab and it's relevant submenu.
Ex: Tab1 (submenu: Tab1Link1, Tab1Link2) Tab2 (submenu: Tab2Link1,Tab2Link2) If I click on ... say ... Tab2Link2 the correct panel will load but the tabbedpanel will revert back to Tab1 (and it's submenu) being selected. I believe I need to use setSelectedTab somewhere but have been unable to get it to work. Thanks .......... igor.vaynberg wrote: > > right, and that is just now how markup inheritance or tabbed panel > works. you are way off base. > > if that is what you need then instead of using wicket:child/markup > inheritance you should use replace/replaceWith() methods to put the > right panel in, and instead of using a tabbed panel you would use > something that just generates a list of links that call the > replace/replaceWith() methods... > > -igor > > > On 10/30/07, DRE <[EMAIL PROTECTED]> wrote: >> >> Thanks for you response .... that link is actually where I got started, >> however, if you notice when you click the tabs the panel is displayed >> right >> below. When I click my tabs I want the panel to be displayed in the body >> in >> place of the <wicket:child /> >> >> Any help would be greatly appreciated. >> >> >> >> igor.vaynberg wrote: >> > >> > see here for an example: >> > >> > >> http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.TabbedPanelPage >> > >> > -igor >> > >> > >> > On 10/30/07, DRE <[EMAIL PROTECTED]> wrote: >> >> >> >> Hoping someone can help me out here .... I've just started using >> Wicket >> >> and >> >> this is what I'm trying to do: >> >> >> >> I've got a main page that has a header, body, and footer where the >> body >> >> should be used as a wicket child. In the header I have a TabbedPanel. >> >> When >> >> I click on a tab I want the contents to appear in the body(not right >> >> below >> >> the tab....in the header.) It looks all pretty and the tabs work .... >> >> it's >> >> just that when I click on the tab I want "This is Tab #1" to be >> displayed >> >> in >> >> the body. I've tried using <wicket:extend> but to no avail. >> Thanks >> >> in >> >> advance ......... >> >> >> >> Code: >> >> >> >> PanelPage.html >> >> >> >> <html> >> >> <head> >> >> <title wicket:id="title">Title goes here</title> >> >> <link rel="stylesheet" type="text/css" href="css/tab.css" /> >> >> </head> >> >> >> >> <body> >> >> >> >> <div id="header"> >> >> <div wicket:id="tabs" class="tabpanel">[tabbed panel will be >> >> here]</div> >> >> </div> >> >> >> >> <div id="body" class="body"> >> >> This is the Body >> >> <wicket:child /> >> >> </div> >> >> >> >> <div id="footer" class="footer"> >> >> <br> >> >> </div> >> >> >> >> </body> >> >> </html> >> >> >> >> >> >> >> >> PanelPage.java >> >> >> >> public class PanelPage extends WebPage >> >> { >> >> >> >> public PanelPage() >> >> { >> >> >> >> final List tabs=new ArrayList(); >> >> >> >> tabs.add(new AbstractTab(new Model("My Home Page")) >> >> { >> >> public Panel getPanel(String panelId) >> >> { >> >> return new TabPanel1(panelId); >> >> } >> >> }); >> >> >> >> tabs.add(new AbstractTab(new Model("Leads")) >> >> { >> >> public Panel getPanel(String panelId) >> >> { >> >> return new TabPanel2(panelId); >> >> } >> >> }); >> >> >> >> >> >> final TabbedPanel panel = new TabbedPanel("tabs", tabs); >> >> class TabTitleModel extends Model >> >> { >> >> public Object getObject(Component comp) >> >> { >> >> return ((ITab) >> >> tabs.get(panel.getSelectedTab())).getTitle().getObject(null); >> >> } >> >> } >> >> add(new Label("title", new TabTitleModel())); >> >> add(panel); >> >> >> >> add(new Label("footer", "This is in the footer")); >> >> >> >> } >> >> >> >> >> >> } >> >> >> >> TabbedPanel.html >> >> >> >> <wicket:panel> >> >> <div class="tab-row"> >> >> <ul> >> >> <li wicket:id="tabs"> >> >> <!-- The Tab link and display text --> >> >> # [[tab title]] >> >> </li> >> >> </ul> >> >> </div> >> >> >> >> >> >> <!-- Currently active panel falls here --> >> >> >> >> [panel] >> >> >> >> </wicket:panel> >> >> >> >> >> >> TabPanel1.html >> >> >> >> <html> >> >> <body> >> >> <wicket:panel> >> >> This is Tab #1 >> >> </wicket:panel> >> >> </body> >> >> </html> >> >> >> >> >> >> TabPanel1.java >> >> >> >> package wicket.panel.panels; >> >> >> >> import wicket.markup.html.panel.Panel; >> >> >> >> public class TabPanel1 extends Panel >> >> { >> >> private static final long serialVersionUID = 1L; >> >> >> >> public TabPanel1(String id) >> >> { >> >> super(id); >> >> } >> >> >> >> } >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/TabbedPanel-tf4719265.html#a13491072 >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/TabbedPanel-tf4719265.html#a13492383 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/TabbedPanel-tf4719265.html#a13530689 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]