Hi, You need to override AjaxLink's #getAjaxCallDecorator(). With it you can add you script to be executed before or after the real script that will call AjaxLink#onClick. Show some code if you still cannot manage it.
On Wed, Feb 29, 2012 at 4:14 AM, armhold <[email protected]> wrote: > Hi, > > I need to run some Javascript on the client when the user clicks an > AjaxLink. I'm following > https://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html > these instructions , but my onclick() javascript always gets overwritten by > the AjaxLink's behavior. > > I tried overriding getAjaxCallDecorator() as well as adding an > AttributeAppender, and neither seem to work. Nor does adding the appender in > onInitialize(), as > http://apache-wicket.1842946.n4.nabble.com/AttributeModifier-and-AjaxLink-in-1-5-td3830027.html > this thread recommends. > > Thanks for any advice. > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/wrapping-onclick-in-AjaxLink-with-1-5-4-tp4430306p4430306.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
