<>Hi all, I'm a new user to Wicket. I love what I have seen so far. The HelloWorld example was very convincing for me to give Wicket a try!> I am trying to create a menu to go above my pages. I have been
browsing through the Wiki and looked at the navigation example. The
navigation example uses borders, but before I delve into those, I
thought of trying something else, and I wonder if you could give me
some feedback on it. I thought I might use a ListView. I think I could add a ListView to
my page that would contain Links to WebPages to create a simple
navigation bar. I found some example code and HTML in the javadoc: A ListView holds ListItem children. Items can be re-ordered and deleted, either one at a time or many at a time. Example: <tbody> <tr wicket:id="rows" class="even"> <td><span wicket:id="id">Test ID</span></td> ... Though this example is about a HTML table, ListView is not at all limited to HTML tables. Any kind of list can be rendered using ListView. And the related Java code: add(new ListView("rows", listData) { public void populateItem(final ListItem item) { final UserDetails user = (UserDetails)item.getModelObject(); item.add(new Label("id", user.getId())); } }); For a navigation bar I could think of this for the HTML: <div id="navigation"> <span class="item" wicket:id="navigationitems"> <a wicket:id="link" href="">Item</a> <span class="separator"> | </span> </span> </div> But I need some way to identify the last separator in the
stylesheet, so I can hide it. In the example the class "even" is used
in the table row, but how is this updated to "odd" ? Am I on the right track here? Any suggestions, Greetings, -Stijn |
- [Wicket-user] ListView for navigation menu? Stijn de Witt
- Re: [Wicket-user] ListView for navigation menu? Eelco Hillenius
- Re: [Wicket-user] ListView for navigation menu? Phil Kulak
- Re: [Wicket-user] ListView for navigation men... Eelco Hillenius
- Re: [Wicket-user] ListView for navigation... Phil Kulak
- Re: [Wicket-user] ListView for navig... Stijn de Witt