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><a href="#" wicket:id="linkId">Link text here</a></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: [email protected]
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]