It is for an object you can use in the onclick handler.

new AjaxFallbackLink<Person>("oo", new Model(person)) {
    onclick() {
        Person p = getModelObject();
        p.delete();
    }
}

to display dynamic text inside the link, just nest a Label component
inside the link.

<a href="#" wicket:id="link"><span wicket:id="label"></span></a>

Link link = new Link(.....){};
Label label = new Label(....);
link.add(label);
add(link)

Martijn

On Sun, Jun 28, 2009 at 8:54 AM, <bern...@actrix.co.nz> wrote:
> Hi,
>
> I cannot find the purpose of the IModel constructor argument in
> AjaxFallbackLink(java.lang.String id, IModel<T> model) as I was also
> trying to modify the anchor text via the IModel with AJAX.
>
> What is it?
>
> Many thanks.
>
> Bernard
>
>
> On Thu, 25 Jun 2009 12:11:37 -0500, you wrote:
>
>>Two ways come to mind:
>>- override onComponentTagBody and write it directly to the response
>>- use a wicket:fragment - add the fragment to the column, the link to
>>the fragment, and define the text in the html (or use wicket:message,
>>etc)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to