Hi,

> why does it call onFormSubmitted for the root form?  Is this the way it
has to be programmed for nested forms to work?
Well, I think it should not be the case, according to:
https://cwiki.apache.org/WICKET/nested-forms.html

Regards,
Sebastien.

On Thu, May 17, 2012 at 4:18 PM, Hill, Joel (DTMB) <hil...@michigan.gov>wrote:

> If I have a nested form submitted via an AjaxButton, why does it call
> onFormSubmitted for the root form?  Is this the way it has to be programmed
> for nested forms to work?
>
> The problem is that if I refresh any part of the page that contains a
> FormComponent in the outer form, that field gets cleared, because the
> rawInput gets set to null (because inputChanged gets called for all the
> outer form components).
>
> Is the answer that I just have to be more surgical in my use of
> AjaxRequestTarget.addComponent, and only add components that REALLY need to
> be redrawn, and not just redraw a larger area (which requires fewer
> addComponent calls)?  I know that calling clearInput on every component in
> the outer form in the refreshed area(s) will also work, but that seems a
> less appropriate solution (I guess there is Form.clearInput as well, which
> is less labor intensive to use).
>
> I guess this is more of an informational question than anything.  But any
> solutions that require less babysitting of the outer form are welcome.
>  Thanks!
>
> Joel
>

Reply via email to