On Thu, Sep 20, 2012 at 9:53 AM, Jeremy Thomerson <jer...@wickettraining.com
> wrote:

> On Thu, Sep 20, 2012 at 9:50 AM, fabley <a.j...@lrworld.com> 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">
>> > </li>
>> > </ul>
>> >
>> > </div>
>>
>>
>> > Java
>> >
>> > RepeatingView view = new RepeatingView("repeater");
>> > Link link = new Link("1") {
>> >     @Override
>> >         public void onClick() {
>> >
>> >         }
>> > };
>> > 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: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> Add a label to each link.  Then in your code set the model for the label
> according to what is being linked to.
>

Or, in your link override onComponentTagBody and write the text out.  But a
label is generally better.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Reply via email to