Re: How to build a dynamic navigation bar

2008-07-22 Thread Edbay
Works! :clap: Foo public class MyMenuPanel extends Panel { public MyMenuPanel(String id, String label, Class pageClass) { super(id); Link link = new BookmarkablePageLink("link", pageClass); add(link); link.add(new Label("label", label)); } } -- View this message

Re: How to build a dynamic navigation bar

2008-07-22 Thread John Krasnay
Something like this... Foo public class MyMenuPanel extends Panel { public MyMenuPanel(String id, String label, Class pageClass) { super(id); Link link = new BookmarkablePageLink("link", pageClass); add(link); link.add(new Label("label", label)); } } jk On Tue, Jul 22, 2

Re: How to build a dynamic navigation bar

2008-07-22 Thread Edbay
I get this approach. Can you provide the code for the panel? # Foo RepeatingView menu = new RepeatingView("menuItem"); menu.add(new MyMenuPanel(menu.newChildId(), "Home", HomePage.class)); if (userIsDarthVader) { menu.add(new MyMenuPanel(menu.newChildId(), "Enslave Universe",

Re: How to build a dynamic navigation bar

2008-07-22 Thread puschteblume
:) Alex -Opprinnelig melding- Fra: Edbay [mailto:[EMAIL PROTECTED] Sendt: 22. juli 2008 19:00 Til: users@wicket.apache.org Emne: RE: How to build a dynamic navigation bar Thanks for the quick reply. Wouldn't this force all links to have the same wicket ids ("linkid")? I&

Re: How to build a dynamic navigation bar

2008-07-22 Thread sstendal
Edbay wrote: > > > I tried using ListView, but I could not get it to work, as it forces the > wicket id of the line items to be all the same. > > Why is that a problem? Using ListView should be a good solution. Could you elaborate? -- View this message in context: http://www.nabble.com/H

Re: How to build a dynamic navigation bar

2008-07-22 Thread John Krasnay
On Tue, Jul 22, 2008 at 09:59:48AM -0700, Edbay wrote: > > Thanks for the quick reply. > > Wouldn't this force all links to have the same wicket ids ("linkid")? > I'd like to be able to have the line items look like this: > > ># Link01 text here ># Link02 text here >#

RE: How to build a dynamic navigation bar

2008-07-22 Thread Alexander Landsnes Keül
ECTED] Sendt: 22. juli 2008 19:00 Til: users@wicket.apache.org Emne: RE: How to build a dynamic navigation bar Thanks for the quick reply. Wouldn't this force all links to have the same wicket ids ("linkid")? I'd like to be able to have the line items look like this:

RE: How to build a dynamic navigation bar

2008-07-22 Thread Edbay
Thanks for the quick reply. Wouldn't this force all links to have the same wicket ids ("linkid")? I'd like to be able to have the line items look like this: # Link01 text here # Link02 text here # Link03 text here Alexander Landsnes Keül wrote: > > I'd use a

RE: How to build a dynamic navigation bar

2008-07-22 Thread Alexander Landsnes Keül
I'd use a ListView :) Assuming this lil code add( new ListView("list", linkList ) { public void populateItem(ListItem item) { item.add( (Link)linkList ); } }); You'd have the html look something like this Link text here Just remember to add wha