yes, it is trivial to do.
first part of this is building a url. you can see how link does it, but in short
class mylink extends webmarkupcontainer implements ilinklistener {
public void onlinkclicked() {
.. do something
}
}
mylink l=new mylink(..);
string url=urlfor(l, ilinklistener.interface);
this will get you the url that will invoke onlinkclicked method on the
instance "l"
the second part is performing the actual ajax call. this is trivial
with any third party ajax library out there. if you, however, want
this to work as a regular ajax callback i would take a look at
AjaxLink and also look at wicket-ajax.js to see how wicketAjaxGet
function works.
-igor
On Wed, Dec 23, 2009 at 9:06 PM, Douglas Ferguson
<[email protected]> wrote:
> I have a page that has 100s of links on them that are all ajax calls.
> Each one calls the same method but passes in a different "id" to the method.
>
> Apparently there is quite a bit of time building the UI controls (100
> ajaxLinks).
> Is there a way to create a handler that could be reused by all 100 of the
> links to cut down on overhead?
>
> D/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]