Transparently surround a component with a link in Wicket

Posted by Toni Menzel on Stack Overflow See other posts from Stack Overflow or by Toni Menzel
Published on 2010-05-31T14:43:08Z Indexed on 2010/05/31 17:13 UTC
Read the original article Hit count: 208

Filed under:
|

I want to be able to add links on certain items in an ListView.

If an items is surrounded by the link or not is up to the code, so its not in the normal page markup. Say i have a markup like this:

<div class="column" wicket:id="columnRepeater">
        <span wicket:id="column"></span>
</div>

So essentially, while filling the repeater with a ListView i am able to find a custom renderer for the column component. (not my playingfield).

What i want is to add a Link/Ajax Link around the column component. I learned using wicket:border lets you surround additional stuff.

Now, the border markup looks like this:

<wicket:border>
    <a wicket:id="link"><wicket:body/></a>
</wicket:border>

Now, i am a bit puzzled what the Border implementation looks like.

Anyone there who can suggest a working java part? I have a couple of "work in progress" solutions but none works. Most questions have to do with usage of component ids.

Is the border id = column ? Whats the id of the inner (border body) id then?

© Stack Overflow or respective owner

Related posts about listview

Related posts about wicket