You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by DRE <de...@setel.com> on 2007/11/01 16:17:45 UTC

Re: TabbedPanel

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 <de...@setel.com> 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 <de...@setel.com> 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: users-unsubscribe@wicket.apache.org
>> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>> >
>>
>> --
>> 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: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: IE 3-7

Posted by William Hoover <wh...@nemours.org>.
Yeah, I was using a dedicated vm as well. It was interesting to see what some of our sites looked like under older versions of IE (3-5.5), but beyond that I can't see any practical reasons to do so. However, it is useful to have IE6 & IE7 running under the same machine. Glad it could be of use for you :)

-----Original Message-----
From: Gerolf Seitz [mailto:gerolf.seitz@gmail.com]
Sent: Thursday, November 01, 2007 6:18 PM
To: users@wicket.apache.org
Subject: Re: IE 3-7


On Nov 1, 2007 4:52 PM, William Hoover <wh...@nemours.org> wrote:

> If anyone is interested in running IE versions 3-7 on the same machine
> checkout http://tredosoft.com/Multiple_IE and
> http://tredosoft.com/IE7_standalone
>

william, thanks for the link.
i tried "Multiple IE" (for IE6) and it works well.
no more need for a dedicated vm windows installation just for IE6 ;)

  Gerolf

Re: IE 3-7

Posted by Gerolf Seitz <ge...@gmail.com>.
On Nov 1, 2007 4:52 PM, William Hoover <wh...@nemours.org> wrote:

> If anyone is interested in running IE versions 3-7 on the same machine
> checkout http://tredosoft.com/Multiple_IE and
> http://tredosoft.com/IE7_standalone
>

william, thanks for the link.
i tried "Multiple IE" (for IE6) and it works well.
no more need for a dedicated vm windows installation just for IE6 ;)

  Gerolf

IE 3-7

Posted by William Hoover <wh...@nemours.org>.
If anyone is interested in running IE versions 3-7 on the same machine checkout http://tredosoft.com/Multiple_IE and http://tredosoft.com/IE7_standalone 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org