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 2016/09/26 20:13:59 UTC
AjaxCallListener
How to replace the "new CancelEventIfNoAjaxDecorator();" in wicket 7
AjaxCallListener?
Any help?
Re: AjaxCallListener
Posted by durairaj t <du...@gmail.com>.
Thank you!
On Tue, Sep 27, 2016 at 10:21 AM, Martin Grigorov <mg...@apache.org>
wrote:
> Hi,
>
> decorateScript() means "do something before and after".
> So you need IAjaxCallListener's onBefore() and onComplete()
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Sep 27, 2016 at 4:11 PM, durairaj t <du...@gmail.com>
> wrote:
>
> > Based on the wicket 1.5 comments in IAjaxCallDecorator.java,
> > I think, I may need to use "beforeSend" for "decorateScript" and
> > "onSuccess" for "decorateOnSuccessScript".
> >
> > But I'm not sure. Any help?
> >
> > *Code snippet from wicket 1.5 IAjaxCallDecorator.java*
> >
> > /**
> > * Decorates the script that performs the ajax call
> > *
> > * @param component
> > * @param script
> > * @return decorated script
> > */
> > CharSequence decorateScript(Component component, CharSequence script);
> >
> > /**
> > * Decorates the onSuccess handler script
> > *
> > * @param component
> > * @param script
> > * @return decorated onSuccess handler script
> > */
> > CharSequence decorateOnSuccessScript(Component component, CharSequence
> > script);
> >
> > On Tue, Sep 27, 2016 at 8:54 AM, durairaj t <du...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I'm replacing "decorateScript(Component arg0,CharSequence script)" with
> > > "AjaxRequestAttributes#getSuccessHandler(Component component)"
> > > and
> > > "decorateOnSuccessScript(Component arg0,CharSequence script)" with
> > > "AjaxRequestAttributes# onSuccess(....."
> > >
> > >
> > > *Is it correct?*
> > >
> > >
> > >
> > >
> > > On Mon, Sep 26, 2016 at 4:35 PM, Tobias Soloschenko <
> > > tobiassoloschenko@googlemail.com> wrote:
> > >
> > >> Hi,
> > >>
> > >> I just googled for it:
> > >>
> > >> http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-
> > >> 6-CancelEventIfNoAjaxDecorator-td4652609.html
> > >>
> > >> Hope this helps.
> > >>
> > >> kind regards
> > >>
> > >> Tobias
> > >>
> > >> > Am 26.09.2016 um 22:13 schrieb durairaj t <du...@gmail.com>:
> > >> >
> > >> > How to replace the "new CancelEventIfNoAjaxDecorator();" in
> wicket 7
> > >> > AjaxCallListener?
> > >> >
> > >> > Any help?
> > >>
> > >
> > >
> >
>
Re: AjaxCallListener
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
decorateScript() means "do something before and after".
So you need IAjaxCallListener's onBefore() and onComplete()
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Tue, Sep 27, 2016 at 4:11 PM, durairaj t <du...@gmail.com> wrote:
> Based on the wicket 1.5 comments in IAjaxCallDecorator.java,
> I think, I may need to use "beforeSend" for "decorateScript" and
> "onSuccess" for "decorateOnSuccessScript".
>
> But I'm not sure. Any help?
>
> *Code snippet from wicket 1.5 IAjaxCallDecorator.java*
>
> /**
> * Decorates the script that performs the ajax call
> *
> * @param component
> * @param script
> * @return decorated script
> */
> CharSequence decorateScript(Component component, CharSequence script);
>
> /**
> * Decorates the onSuccess handler script
> *
> * @param component
> * @param script
> * @return decorated onSuccess handler script
> */
> CharSequence decorateOnSuccessScript(Component component, CharSequence
> script);
>
> On Tue, Sep 27, 2016 at 8:54 AM, durairaj t <du...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I'm replacing "decorateScript(Component arg0,CharSequence script)" with
> > "AjaxRequestAttributes#getSuccessHandler(Component component)"
> > and
> > "decorateOnSuccessScript(Component arg0,CharSequence script)" with
> > "AjaxRequestAttributes# onSuccess(....."
> >
> >
> > *Is it correct?*
> >
> >
> >
> >
> > On Mon, Sep 26, 2016 at 4:35 PM, Tobias Soloschenko <
> > tobiassoloschenko@googlemail.com> wrote:
> >
> >> Hi,
> >>
> >> I just googled for it:
> >>
> >> http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-
> >> 6-CancelEventIfNoAjaxDecorator-td4652609.html
> >>
> >> Hope this helps.
> >>
> >> kind regards
> >>
> >> Tobias
> >>
> >> > Am 26.09.2016 um 22:13 schrieb durairaj t <du...@gmail.com>:
> >> >
> >> > How to replace the "new CancelEventIfNoAjaxDecorator();" in wicket 7
> >> > AjaxCallListener?
> >> >
> >> > Any help?
> >>
> >
> >
>
Re: AjaxCallListener
Posted by durairaj t <du...@gmail.com>.
Based on the wicket 1.5 comments in IAjaxCallDecorator.java,
I think, I may need to use "beforeSend" for "decorateScript" and
"onSuccess" for "decorateOnSuccessScript".
But I'm not sure. Any help?
*Code snippet from wicket 1.5 IAjaxCallDecorator.java*
/**
* Decorates the script that performs the ajax call
*
* @param component
* @param script
* @return decorated script
*/
CharSequence decorateScript(Component component, CharSequence script);
/**
* Decorates the onSuccess handler script
*
* @param component
* @param script
* @return decorated onSuccess handler script
*/
CharSequence decorateOnSuccessScript(Component component, CharSequence
script);
On Tue, Sep 27, 2016 at 8:54 AM, durairaj t <du...@gmail.com> wrote:
> Hi,
>
> I'm replacing "decorateScript(Component arg0,CharSequence script)" with
> "AjaxRequestAttributes#getSuccessHandler(Component component)"
> and
> "decorateOnSuccessScript(Component arg0,CharSequence script)" with
> "AjaxRequestAttributes# onSuccess(....."
>
>
> *Is it correct?*
>
>
>
>
> On Mon, Sep 26, 2016 at 4:35 PM, Tobias Soloschenko <
> tobiassoloschenko@googlemail.com> wrote:
>
>> Hi,
>>
>> I just googled for it:
>>
>> http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-
>> 6-CancelEventIfNoAjaxDecorator-td4652609.html
>>
>> Hope this helps.
>>
>> kind regards
>>
>> Tobias
>>
>> > Am 26.09.2016 um 22:13 schrieb durairaj t <du...@gmail.com>:
>> >
>> > How to replace the "new CancelEventIfNoAjaxDecorator();" in wicket 7
>> > AjaxCallListener?
>> >
>> > Any help?
>>
>
>
Re: AjaxCallListener
Posted by durairaj t <du...@gmail.com>.
Hi,
I'm replacing "decorateScript(Component arg0,CharSequence script)" with
"AjaxRequestAttributes#getSuccessHandler(Component component)"
and
"decorateOnSuccessScript(Component arg0,CharSequence script)" with
"AjaxRequestAttributes# onSuccess(....."
*Is it correct?*
On Mon, Sep 26, 2016 at 4:35 PM, Tobias Soloschenko <
tobiassoloschenko@googlemail.com> wrote:
> Hi,
>
> I just googled for it:
>
> http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-6-
> CancelEventIfNoAjaxDecorator-td4652609.html
>
> Hope this helps.
>
> kind regards
>
> Tobias
>
> > Am 26.09.2016 um 22:13 schrieb durairaj t <du...@gmail.com>:
> >
> > How to replace the "new CancelEventIfNoAjaxDecorator();" in wicket 7
> > AjaxCallListener?
> >
> > Any help?
>
Re: AjaxCallListener
Posted by durairaj t <du...@gmail.com>.
Ya. I used AjaxRequestAttributes#setPreventDefault(true);
Thank you!
On Mon, Sep 26, 2016 at 4:35 PM, Tobias Soloschenko <
tobiassoloschenko@googlemail.com> wrote:
> Hi,
>
> I just googled for it:
>
> http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-6-
> CancelEventIfNoAjaxDecorator-td4652609.html
>
> Hope this helps.
>
> kind regards
>
> Tobias
>
> > Am 26.09.2016 um 22:13 schrieb durairaj t <du...@gmail.com>:
> >
> > How to replace the "new CancelEventIfNoAjaxDecorator();" in wicket 7
> > AjaxCallListener?
> >
> > Any help?
>
Re: AjaxCallListener
Posted by Tobias Soloschenko <to...@googlemail.com>.
Hi,
I just googled for it:
http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-6-CancelEventIfNoAjaxDecorator-td4652609.html
Hope this helps.
kind regards
Tobias
> Am 26.09.2016 um 22:13 schrieb durairaj t <du...@gmail.com>:
>
> How to replace the "new CancelEventIfNoAjaxDecorator();" in wicket 7
> AjaxCallListener?
>
> Any help?