Hi everyone.
I am quite new to Wicket but I start to really like it ;-)
I have a problem on which I spent several hours of research and trying but
it wouldn't solve.
I have a navigation in which the navigationlinks have to be dynamically
added (dependent on which rights the logged-in user has). So I used a
ListView which uses a LoadableDetachableModel to define which links to add
to the navigation.
...
<_li wicket:id="itemList">
<_a class="menuItem" wicket:id="menuListItem">
<_span wicket:id="itemName">[itemName]<_/span>
<_/a>
<_/li>
...
The current page shall have an other CSS-class ("activeMenuItem") .
Therefore the navigation has to know, which page is the current one.
...
if (menuItem.getPage().equals(currentPage)) {
page.add(new AttributeModifier("class", true, new
Model("activeMenuItem")));
}
...
My question/problem is: how do I get the "currentPage" (the currently active
link)?
I hope the description of the problem is sufficient.
Greetings from Germany
Thomas Jaeckle
--
View this message in context:
http://www.nabble.com/How-do-I-get-the-current-page--tf4758474.html#a13607965
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]