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
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
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",
:)
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&
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
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
>#
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:
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
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