On 18.02.2012 17:46, Jürgen Lind wrote:
thank you for your reply, I did not know that such a method exists (does
it for 1.4
or is this already Wicket 1.5). An secondly: are these handlers fired on
a ajax
update of an existing DOM Element or only when it is added?

This is also available in 1.4. The events are fired when you add something to the ajax request via target.add(Component)

And where would I put the Javascript that registers the handler? In the
Markup-Page of
the Component? How do I make sure, the handler is added only once?

I use jQuery and register the handler globally in my main.js for every page within $(document).ready().

This approach works very well if you don't want to create subclasses of components but rather execute some specific JS if e.g. a css class is present. I use it to add a hint image to every autocomplete textfield via jQuery.

If it's more component specific then the renderHead() solution seems better.


Christoph

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

Reply via email to