They need the same wicket:id yes, but that doesn't mean that they need the same 
text or targets. Just create as many links as you want/need, with whatever 
behaviour they need. Just make sure they all have the same id :)

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'd like to be able to have the line items look like this:

<ul wicket:id="list">
        <li> # Link01 text here </li>
        <li> # Link02 text here </li>
        <li> # Link03 text here </li>
</ul>





Alexander Landsnes Keül wrote:
> 
> 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
> 
> <ul wicket:id="list">
>       <li> # Link text here </li>
> </ul>
> 
> Just remember to add whatever you want to the item, and not just use
> add(...). 
> 
> http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/list/ListView.html
> 
> Alex
> 
> -----Opprinnelig melding-----
> Fra: Edbay [mailto:[EMAIL PROTECTED] 
> Sendt: 22. juli 2008 18:08
> Til: users@wicket.apache.org
> Emne: How to build a dynamic navigation bar
> 
> 
> Hello, 
>   
> I want to be able to build a left-side dynamic navigation bar based on
> user
> permissions. For example, if the user does not have access to the Prices
> page, I do not want to show the Prices link on the navigation bar. Also,
> since the link will point to a Wicket page, it has to be a Wicket link. 
> 
> This is how I would like the NavBar to appear: 
> 
>               <div id="mainNav">
>                       <ul>
>                               <li> Home </li>
>                               <li> Prices </li>
>                               <li> Contracts </li>
>                               <li> Products </li>
>                               <li> Transactions </li>
>                       </ul>
>               </div>
> 
> 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. 
> 
> 
> Thanks in advance.
> -- 
> View this message in context:
> http://www.nabble.com/How-to-build-a-dynamic-navigation-bar-tp18592899p18592899.html
> 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/How-to-build-a-dynamic-navigation-bar-tp18592899p18593941.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to