Wicket : Can a Panel or Component react on a form submit without any boilerplate code?
Posted
by MRalwasser
on Stack Overflow
See other posts from Stack Overflow
or by MRalwasser
Published on 2010-06-02T12:58:52Z
Indexed on
2010/06/02
20:14 UTC
Read the original article
Hit count: 329
I am currently evaluating Wicket and I am trying to figure out how things work.
I have a question regarding form submit and panels (or other components). Imagine a custom wicket panel which contains a text field, doing as-you-type validation using ajax. This panel is added to a form. How can the Panel react a form submit (let's say because javascript/ajax is unavailable)?
I am currently only aware of one solution: calling a panel's method inside the Form onSubmit() method. But this seems not like a "reusable" approach here, because I have to add boilerplate code to every form's onSubmit() which contains the panel (and every developer which use the panel must know this).
So here comes my question: Is there any way that a Panel/Component can "detect" a form submit in some way? Or is there any other solution beside this?
Thank you.
© Stack Overflow or respective owner