You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ondrej Zizka <oz...@redhat.com> on 2013/01/11 11:47:35 UTC

How to "pass" AJAX behavior to wrapped form component?

Hi,

if I have an input wrapped in a div (together with other stuff),
how can I pass to that input whatever beavior is added to the wrapper?

Example:
    Component HTML goes like <div> <img> <input> ...
    Then user it's added like add( new MyComponent("foo", model).add( 
new AjaxEventBehavior("onupdate"){ ... }

I assume I could move this behavior object from wrapper to input, but 
don't know where - is there some "after construction" listener?
Or should I do it completely different, like passing the behavior as a 
parameter?
The reason to keep it like above is to make it transparent for the user.

Thanks,
Ondra

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