You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Michal Margiel <mi...@gmail.com> on 2012/06/03 22:54:12 UTC

AjaxButton in Wicket 6.0

Hello,
Experimentally I tried to move our project[1] to Wicket 6.0.0-beta2
One of the problems is that *getAjaxCallDecorator* method was removed from *
AjaxButton*. Neither in migration[2] guid nor in JavaDoc I cannot find how
I can replace its functionality.

In 1.5 we use this metthod to add JavaScript showing popup window in which
user can confirm/cancel his/her action.


[1]  https://bitbucket.org/margielm/confitura/
[2] https://cwiki.apache.org/WICKET/migration-to-wicket-60.html

-- 
Pozdrawiam/Best regards
Michał Margiel

http://www.confitura.pl (dawniej Javarsovia)
http://www.linkedin.com/in/MichalMargiel

Re: AjaxButton in Wicket 6.0

Posted by Michal Margiel <mi...@gmail.com>.
Thanks a lot.

2012/6/4 Martin Grigorov <mg...@apache.org>

> Hi,
>
> As Vineet said there is a link in the migration page to a more
> detailed page about how Ajax works in Wicket 6.
>
> Since there is no script to decorate (because we don't use inline
> attributes anymore but event registration) the old AjaxCallDecorator
> is removed.
> The new way is:
>
> @Override
> protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
>   super.updateAjaxAttributes(attributes);
>
>   AjaxCallListener listener = new AjaxCallListener();
>   listener.onPrecondition(yourConfirmLogicHere);
>   attributes.getAjaxCallListeners().add(listener);
> }
>
> On Mon, Jun 4, 2012 at 12:26 AM, vineet semwal
> <vi...@gmail.com> wrote:
> > Hi,
> > decorator is replaced with iajaxcallistener ,take a look at wicket 6
> migration ,
> > after that override updateAjaxAttributes(AjaxRequestAttributes
> > attributes)  in your ajaxbutton and add your ajaxCallListener in
> > attributes.getAjaxCallListeners()
> >
> >
> > On Mon, Jun 4, 2012 at 2:24 AM, Michal Margiel <mi...@gmail.com>
> wrote:
> >> Hello,
> >> Experimentally I tried to move our project[1] to Wicket 6.0.0-beta2
> >> One of the problems is that *getAjaxCallDecorator* method was removed
> from *
> >> AjaxButton*. Neither in migration[2] guid nor in JavaDoc I cannot find
> how
> >> I can replace its functionality.
> >>
> >> In 1.5 we use this metthod to add JavaScript showing popup window in
> which
> >> user can confirm/cancel his/her action.
> >>
> >>
> >> [1]  https://bitbucket.org/margielm/confitura/
> >> [2] https://cwiki.apache.org/WICKET/migration-to-wicket-60.html
> >>
> >> --
> >> Pozdrawiam/Best regards
> >> Michał Margiel
> >>
> >> http://www.confitura.pl (dawniej Javarsovia)
> >> http://www.linkedin.com/in/MichalMargiel
> >
> >
> >
> > --
> > thank you,
> >
> > regards,
> > Vineet Semwal
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pozdrawiam/Best regards
Michał Margiel

http://www.confitura.pl (dawniej Javarsovia)
http://www.linkedin.com/in/MichalMargiel
http://www.margiel.eu

Re: AjaxButton in Wicket 6.0

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

As Vineet said there is a link in the migration page to a more
detailed page about how Ajax works in Wicket 6.

Since there is no script to decorate (because we don't use inline
attributes anymore but event registration) the old AjaxCallDecorator
is removed.
The new way is:

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
   super.updateAjaxAttributes(attributes);

   AjaxCallListener listener = new AjaxCallListener();
   listener.onPrecondition(yourConfirmLogicHere);
   attributes.getAjaxCallListeners().add(listener);
}

On Mon, Jun 4, 2012 at 12:26 AM, vineet semwal
<vi...@gmail.com> wrote:
> Hi,
> decorator is replaced with iajaxcallistener ,take a look at wicket 6 migration ,
> after that override updateAjaxAttributes(AjaxRequestAttributes
> attributes)  in your ajaxbutton and add your ajaxCallListener in
> attributes.getAjaxCallListeners()
>
>
> On Mon, Jun 4, 2012 at 2:24 AM, Michal Margiel <mi...@gmail.com> wrote:
>> Hello,
>> Experimentally I tried to move our project[1] to Wicket 6.0.0-beta2
>> One of the problems is that *getAjaxCallDecorator* method was removed from *
>> AjaxButton*. Neither in migration[2] guid nor in JavaDoc I cannot find how
>> I can replace its functionality.
>>
>> In 1.5 we use this metthod to add JavaScript showing popup window in which
>> user can confirm/cancel his/her action.
>>
>>
>> [1]  https://bitbucket.org/margielm/confitura/
>> [2] https://cwiki.apache.org/WICKET/migration-to-wicket-60.html
>>
>> --
>> Pozdrawiam/Best regards
>> Michał Margiel
>>
>> http://www.confitura.pl (dawniej Javarsovia)
>> http://www.linkedin.com/in/MichalMargiel
>
>
>
> --
> thank you,
>
> regards,
> Vineet Semwal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: AjaxButton in Wicket 6.0

Posted by vineet semwal <vi...@gmail.com>.
Hi,
decorator is replaced with iajaxcallistener ,take a look at wicket 6 migration ,
after that override updateAjaxAttributes(AjaxRequestAttributes
attributes)  in your ajaxbutton and add your ajaxCallListener in
attributes.getAjaxCallListeners()


On Mon, Jun 4, 2012 at 2:24 AM, Michal Margiel <mi...@gmail.com> wrote:
> Hello,
> Experimentally I tried to move our project[1] to Wicket 6.0.0-beta2
> One of the problems is that *getAjaxCallDecorator* method was removed from *
> AjaxButton*. Neither in migration[2] guid nor in JavaDoc I cannot find how
> I can replace its functionality.
>
> In 1.5 we use this metthod to add JavaScript showing popup window in which
> user can confirm/cancel his/her action.
>
>
> [1]  https://bitbucket.org/margielm/confitura/
> [2] https://cwiki.apache.org/WICKET/migration-to-wicket-60.html
>
> --
> Pozdrawiam/Best regards
> Michał Margiel
>
> http://www.confitura.pl (dawniej Javarsovia)
> http://www.linkedin.com/in/MichalMargiel



-- 
thank you,

regards,
Vineet Semwal

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