You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by durairaj t <du...@gmail.com> on 2017/04/18 21:29:04 UTC

Wicket7 - How to replace the getWicketEventHandler()

How to replace the below code in wicket7?


*Below code from wicket 1.5:*

protected CharSequence getWicketEventHandler()
{
return generateCallbackScript(new
AppendingStringBuffer("wicketAjaxPost('").append(
getCallbackUrl()).append(
"', wicketSerialize(Wicket.$('" + getComponent().getMarkupId() + "'))"));
}

Re: Wicket7 - How to replace the getWicketEventHandler()

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

What is this Ajax behavior supposed to do exactly ?

Looking at the code all you need to do is: formComponent.add(new
AjaxFormComponentUpdatingBehavior("...") { ... })
This will use POST by default and will sent the form component's value to
the server. Just as your snippet does.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Apr 18, 2017 at 11:29 PM, durairaj t <du...@gmail.com> wrote:

> How to replace the below code in wicket7?
>
>
> *Below code from wicket 1.5:*
>
> protected CharSequence getWicketEventHandler()
> {
> return generateCallbackScript(new
> AppendingStringBuffer("wicketAjaxPost('").append(
> getCallbackUrl()).append(
> "', wicketSerialize(Wicket.$('" + getComponent().getMarkupId() + "'))"));
> }
>