You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Igor Vaynberg <ig...@gmail.com> on 2010/06/02 17:07:59 UTC

Re: Can a Panel or Component react on a form submit without any boilerplate code?

instead of a Panel use FormComponentPanel, that way it will
participate in the regular form processing workflow and you can detect
a submit in the correct phase: type conversion, validation, model
update.

-igor

On Wed, Jun 2, 2010 at 7:41 AM,  <pa...@mainlan.de> wrote:
> Hello,
>
> 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.
>
> Best regards,
> Patric
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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