Wicket link - is adding a label necessary to set the text?

Posted by Ondra Žižka on Stack Overflow See other posts from Stack Overflow or by Ondra Žižka
Published on 2010-05-12T06:40:35Z Indexed on 2010/05/12 6:44 UTC
Read the original article Hit count: 316

Filed under:
|
|

Currently, I do this:

<li><a wicket:id="link" href="#"><span wicket:id="name">jawa01</span></a></li>

and

item.add( new BookmarkablePageLink("link", ResourcePage.class)
   .setParameter("name", item.getModelObject().getName())
   .add( new Label("name", item.getModelObject().getName()) )
);

I want to do ommit the element:

<li><a wicket:id="link" href="#">...</a></li>

How should the java code look?

I expect something like

item.add( new BookmarkablePageLinkWithLabel(
   "link", ResourcePage.class, item.getModelObject().getName())
   .setParameter("name", item.getModelObject().getName())
);

Thanks, Ondra

© Stack Overflow or respective owner

Related posts about wicket

Related posts about link