You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Corbin, James" <jc...@iqnavigator.com> on 2012/11/30 22:20:07 UTC
Wicket 6 Ajax Behaviors
I have some older javascript code that I am migrating to work with Wicket 6 and not sure how to do so.
I had some javascript that was triggering the onclick of an element in the following way,
somedomeelement.click(); // post wicket 1.4 this causes error - TypeError: Property 'onclick' of object #<HTMLTableRowElement> is not a function.
Post wicket 6 (1.5?) this will not work because of how wicket no longer produces the "onclick" attribute and instead uses event registration.
So, my question, how do I need to modify my javascript to be able to trigger the click event, because <elem>.click(); doesn't work.
J.D.
Re: Wicket 6 Ajax Behaviors
Posted by Martin Grigorov <mg...@apache.org>.
See http://api.jquery.com/triggerHandler/
On Fri, Nov 30, 2012 at 10:20 PM, Corbin, James <jc...@iqnavigator.com>wrote:
> I have some older javascript code that I am migrating to work with Wicket
> 6 and not sure how to do so.
>
> I had some javascript that was triggering the onclick of an element in the
> following way,
>
> somedomeelement.click(); // post wicket 1.4 this causes error -
> TypeError: Property 'onclick' of object #<HTMLTableRowElement> is not a
> function.
>
> Post wicket 6 (1.5?) this will not work because of how wicket no longer
> produces the "onclick" attribute and instead uses event registration.
>
> So, my question, how do I need to modify my javascript to be able to
> trigger the click event, because <elem>.click(); doesn't work.
>
> J.D.
>
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>