You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marek Šabo <ms...@buk.cvut.cz> on 2010/11/01 03:11:57 UTC
Nested form submit and parent form input
Hi all,
I'm using a form which embeds another nested form. An
AjaxFormUpdatingBehavior works in parent form (updates some textfields
via model changes). Problems start when I submit the nested form. Then
the before-mentioned behavior "stops working". While debugging I learned
why - during response building textfield values are rendered from
rawinput and not from updated models. Workaround is to clearInput() on
those field in mentioned behavior.
I would like to know it this is normal and why or ask for some guidance
to reveal why after nested form submits the parent form values are
rendered from raw input (parent form wasn't submitted). (The nested form
component implements IFormVisitingParticipant to skip validation when
parent form submits.)
Regards,
--
Marek Šabo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Nested form submit and parent form input
Posted by Marek Šabo <ms...@buk.cvut.cz>.
Hi,
ok, that makes sense, and how would that be (if somehow) affected by
using setPersistent on formComponents (afaik form cookie support)?
Regards,
--
Marek Šabo
On 11/01/2010 09:22 AM, Martin Makundi wrote:
> RawInput is how the form values are "kept". Otherwise you will lose
> all values and have an empty form for example in page repaint.
>
> **
> Martin
>
> 2010/11/1 Marek Šabo<ms...@buk.cvut.cz>:
>> Hi,
>>
>> thanks for answer, I was wondering if that is a normal behavior even for
>> parent forms to process their values from input when nested form submits.
>> Anyway, good to know it's supposed to be.
>>
>> Regards,
>>
>> --
>> Marek Šabo
>>
>>
>> On 11/01/2010 05:49 AM, Martin Makundi wrote:
>>> Hi!
>>>
>>> Yes. Every time form is processed the form component values are
>>> processed from rawinput. That is the normal usecase = you want to know
>>> what user has entered.
>>>
>>> However, if you want to explicitly dismiss user input, you can call
>>> clearInput or set a new model.
>>>
>>> Alternatively there are behaviors like
>>> AjaxFormComponentUpdatingBehavior that do NOT submit the form.
>>>
>>> **
>>> Martin
>>>
>>>
>>> 2010/11/1 Marek Šabo<ms...@buk.cvut.cz>:
>>>> Hi all,
>>>>
>>>> I'm using a form which embeds another nested form. An
>>>> AjaxFormUpdatingBehavior works in parent form (updates some textfields
>>>> via
>>>> model changes). Problems start when I submit the nested form. Then the
>>>> before-mentioned behavior "stops working". While debugging I learned why
>>>> -
>>>> during response building textfield values are rendered from rawinput and
>>>> not
>>>> from updated models. Workaround is to clearInput() on those field in
>>>> mentioned behavior.
>>>>
>>>> I would like to know it this is normal and why or ask for some guidance
>>>> to
>>>> reveal why after nested form submits the parent form values are rendered
>>>> from raw input (parent form wasn't submitted). (The nested form component
>>>> implements IFormVisitingParticipant to skip validation when parent form
>>>> submits.)
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Marek Šabo
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Nested form submit and parent form input
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
RawInput is how the form values are "kept". Otherwise you will lose
all values and have an empty form for example in page repaint.
**
Martin
2010/11/1 Marek Šabo <ms...@buk.cvut.cz>:
> Hi,
>
> thanks for answer, I was wondering if that is a normal behavior even for
> parent forms to process their values from input when nested form submits.
> Anyway, good to know it's supposed to be.
>
> Regards,
>
> --
> Marek Šabo
>
>
> On 11/01/2010 05:49 AM, Martin Makundi wrote:
>>
>> Hi!
>>
>> Yes. Every time form is processed the form component values are
>> processed from rawinput. That is the normal usecase = you want to know
>> what user has entered.
>>
>> However, if you want to explicitly dismiss user input, you can call
>> clearInput or set a new model.
>>
>> Alternatively there are behaviors like
>> AjaxFormComponentUpdatingBehavior that do NOT submit the form.
>>
>> **
>> Martin
>>
>>
>> 2010/11/1 Marek Šabo<ms...@buk.cvut.cz>:
>>>
>>> Hi all,
>>>
>>> I'm using a form which embeds another nested form. An
>>> AjaxFormUpdatingBehavior works in parent form (updates some textfields
>>> via
>>> model changes). Problems start when I submit the nested form. Then the
>>> before-mentioned behavior "stops working". While debugging I learned why
>>> -
>>> during response building textfield values are rendered from rawinput and
>>> not
>>> from updated models. Workaround is to clearInput() on those field in
>>> mentioned behavior.
>>>
>>> I would like to know it this is normal and why or ask for some guidance
>>> to
>>> reveal why after nested form submits the parent form values are rendered
>>> from raw input (parent form wasn't submitted). (The nested form component
>>> implements IFormVisitingParticipant to skip validation when parent form
>>> submits.)
>>>
>>> Regards,
>>>
>>> --
>>> Marek Šabo
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> 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
Re: Nested form submit and parent form input
Posted by Marek Šabo <ms...@buk.cvut.cz>.
Hi,
thanks for answer, I was wondering if that is a normal behavior even for
parent forms to process their values from input when nested form
submits. Anyway, good to know it's supposed to be.
Regards,
--
Marek Šabo
On 11/01/2010 05:49 AM, Martin Makundi wrote:
> Hi!
>
> Yes. Every time form is processed the form component values are
> processed from rawinput. That is the normal usecase = you want to know
> what user has entered.
>
> However, if you want to explicitly dismiss user input, you can call
> clearInput or set a new model.
>
> Alternatively there are behaviors like
> AjaxFormComponentUpdatingBehavior that do NOT submit the form.
>
> **
> Martin
>
>
> 2010/11/1 Marek Šabo<ms...@buk.cvut.cz>:
>> Hi all,
>>
>> I'm using a form which embeds another nested form. An
>> AjaxFormUpdatingBehavior works in parent form (updates some textfields via
>> model changes). Problems start when I submit the nested form. Then the
>> before-mentioned behavior "stops working". While debugging I learned why -
>> during response building textfield values are rendered from rawinput and not
>> from updated models. Workaround is to clearInput() on those field in
>> mentioned behavior.
>>
>> I would like to know it this is normal and why or ask for some guidance to
>> reveal why after nested form submits the parent form values are rendered
>> from raw input (parent form wasn't submitted). (The nested form component
>> implements IFormVisitingParticipant to skip validation when parent form
>> submits.)
>>
>> Regards,
>>
>> --
>> Marek Šabo
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Nested form submit and parent form input
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!
Yes. Every time form is processed the form component values are
processed from rawinput. That is the normal usecase = you want to know
what user has entered.
However, if you want to explicitly dismiss user input, you can call
clearInput or set a new model.
Alternatively there are behaviors like
AjaxFormComponentUpdatingBehavior that do NOT submit the form.
**
Martin
2010/11/1 Marek Šabo <ms...@buk.cvut.cz>:
> Hi all,
>
> I'm using a form which embeds another nested form. An
> AjaxFormUpdatingBehavior works in parent form (updates some textfields via
> model changes). Problems start when I submit the nested form. Then the
> before-mentioned behavior "stops working". While debugging I learned why -
> during response building textfield values are rendered from rawinput and not
> from updated models. Workaround is to clearInput() on those field in
> mentioned behavior.
>
> I would like to know it this is normal and why or ask for some guidance to
> reveal why after nested form submits the parent form values are rendered
> from raw input (parent form wasn't submitted). (The nested form component
> implements IFormVisitingParticipant to skip validation when parent form
> submits.)
>
> Regards,
>
> --
> Marek Šabo
>
>
> ---------------------------------------------------------------------
> 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