You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ramin <ra...@gmail.com> on 2013/03/11 18:37:46 UTC

Wicket 6 Migration (getEventHandler())

Hi 

In my code, getEventHandler() has been Overriden a few times but now
getEventHandler() of AjaxFormSubmitBehavior/AjaxEventBehavior no longer
exists in Wicket 6. 

I keep finding myself on the following page when looking for an answer but
even after reading it a few times I still don't understand what the
replacement is.    

https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax
<https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax>  

Any advice on what the replacement could be?

Many thanks
Ramin





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-getEventHandler-tp4657169.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket 6 Migration (getEventHandler())

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

Usually such logic in 1.5 and before was done with AjaxCallDecorator.
You can migrate it to Wicket 6 by using IAjaxCallListener. Return the
result of your check in a precondition .


On Tue, Mar 12, 2013 at 10:31 AM, Ramin <ra...@gmail.com> wrote:

> Hi Martin
>
> The method is overriden as below:
>
> @Override
> protected CharSequence getEventHandler() {
>         String check = "javascript: if (some condition) { ";
>         String endCheck = " return false; }";
>         return StringUtils.join(new Object[] { check,
> super.getEventHandler(),
> endCheck });
> }
>
> but there seems to be no reference to this method anywhere in the code,
> hence I am guessing getEventHandler() was used by Wicket (1.5 and earlier)
> in some way.
>
> Thanks
> Ramin
>
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-getEventHandler-tp4657169p4657178.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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 <http://jweekend.com/>

Re: Wicket 6 Migration (getEventHandler())

Posted by Ramin <ra...@gmail.com>.
Hi Martin

The method is overriden as below:

@Override
protected CharSequence getEventHandler() {
	String check = "javascript: if (some condition) { ";
	String endCheck = " return false; }";
	return StringUtils.join(new Object[] { check, super.getEventHandler(),
endCheck });
}

but there seems to be no reference to this method anywhere in the code,
hence I am guessing getEventHandler() was used by Wicket (1.5 and earlier)
in some way. 

Thanks
Ramin







--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-getEventHandler-tp4657169p4657178.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket 6 Migration (getEventHandler())

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

What do you do in this method ?


On Mon, Mar 11, 2013 at 6:37 PM, Ramin <ra...@gmail.com> wrote:

> Hi
>
> In my code, getEventHandler() has been Overriden a few times but now
> getEventHandler() of AjaxFormSubmitBehavior/AjaxEventBehavior no longer
> exists in Wicket 6.
>
> I keep finding myself on the following page when looking for an answer but
> even after reading it a few times I still don't understand what the
> replacement is.
>
> https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax
> <https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax>
>
> Any advice on what the replacement could be?
>
> Many thanks
> Ramin
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-getEventHandler-tp4657169.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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 <http://jweekend.com/>