On Thu, Sep 20, 2012 at 5:50 PM, fabley <[email protected]> wrote:
> Hello again,
>
> I'm sorry but it seems like this doesn't work for me. In your example it
> always uses the same text for each link, but I want to define my own text
> for each link. Is there a way to do this?
>
> Code Snippets:
>
>> HTML
>>
>>
>> <div id="menu">
>>
>> <ul>
>> <li wicket:id="repeater">

You need <li wicket:id="repeater"><a wicket:id="link"></a></li>

>> </li>
>> </ul>
>>
>> </div>
>
>
>> Java
>>
>> RepeatingView view = new RepeatingView("repeater");
>> Link link = new Link("1") {

new Link("link)

>>     @Override
>>         public void onClick() {
>>
>>         }
>> };

link.setBody(Model.of("Some text"));

>> view.add(link);
>> add(view);
>
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Variable-number-of-links-with-just-one-wicket-id-tp4652150p4652178.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to