You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mika Tammilehto <mi...@imis.ch> on 2007/01/17 09:26:38 UTC
hidden form field is reset when updating other form components (T4.1.1)?
Hi
I've got 2 forms which both are submitted async (example below). Form 1
contains a block (innerContainer) with a property selection that should
be updated when form 2 is submitted. This works ok, but when the
"innerContainer" is updated, the value of the hidden field "someNumber"
in form 1 is lost, even though the hidden field is *not* inside
"innerContainer".
Is there any reason for that behaviour? Any workaround? Maybe another
way to update the PropertySelection?
Any help appreciated!
Thanks in advance,
mika
Example:
<div jwcid="container1@Any">
<form jwcid="form1@Form" async="true" updateComponents="container1">
<input type="hidden" jwcid="someNumber@Hidden"
value="ognl:someNumber" />
<div jwcid="innerContainer@Any">
<select jwcid="@PropertySelection" ...>
<option>...</option>
</select>
</div>
....
</form>
</div>
<div jwcid="container2@Any"
<form jwcid="form2@Form" async="true" updateComponents="ognl:
{'container2', 'innerContainer'}">
...
</form>
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: hidden form field is reset when updating other form components (T4.1.1)?
Posted by "B.S.Navin" <bs...@effigent.net>.
You don't even need the div - just set the style attribute directly
on the input tag itself.
We too have been using this approach instead of hidden fields for
storing internal data.
- Navin
On 17-Jan-07, at 6:35 PM, Mika Tammilehto wrote:
> Well, I found a workaround - in case somebody else is running into
> the same problem... I replaced the hidden field with a normal text
> field, but inside a hidden div:
>
> <div style="display: none;">
> <input type="text" jwcid="someNumber@TextField" value=... />
> </div>
>
> Works fine for me.
>
> Cheers,
> mika
>
>
>> Hi
>> I've got 2 forms which both are submitted async (example below).
>> Form 1 contains a block (innerContainer) with a property selection
>> that should be updated when form 2 is submitted. This works ok,
>> but when the "innerContainer" is updated, the value of the hidden
>> field "someNumber" in form 1 is lost, even though the hidden field
>> is *not* inside "innerContainer".
>> Is there any reason for that behaviour? Any workaround? Maybe
>> another way to update the PropertySelection?
>> Any help appreciated!
>> Thanks in advance,
>> mika
>> Example:
>> <div jwcid="container1@Any">
>> <form jwcid="form1@Form" async="true" updateComponents="container1">
>> <input type="hidden" jwcid="someNumber@Hidden"
>> value="ognl:someNumber" />
>> <div jwcid="innerContainer@Any">
>> <select jwcid="@PropertySelection" ...>
>> <option>...</option>
>> </select>
>> </div>
>> ....
>> </form>
>> </div>
>> <div jwcid="container2@Any"
>> <form jwcid="form2@Form" async="true" updateComponents="ognl:
>> {'container2', 'innerContainer'}">
>> ...
>> </form>
>> </div>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: hidden form field is reset when updating other form components
(T4.1.1)?
Posted by Mika Tammilehto <mi...@imis.ch>.
Well, I found a workaround - in case somebody else is running into the
same problem... I replaced the hidden field with a normal text field,
but inside a hidden div:
<div style="display: none;">
<input type="text" jwcid="someNumber@TextField" value=... />
</div>
Works fine for me.
Cheers,
mika
> Hi
>
> I've got 2 forms which both are submitted async (example below). Form 1
> contains a block (innerContainer) with a property selection that should
> be updated when form 2 is submitted. This works ok, but when the
> "innerContainer" is updated, the value of the hidden field "someNumber"
> in form 1 is lost, even though the hidden field is *not* inside
> "innerContainer".
> Is there any reason for that behaviour? Any workaround? Maybe another
> way to update the PropertySelection?
>
> Any help appreciated!
>
> Thanks in advance,
> mika
>
>
> Example:
>
> <div jwcid="container1@Any">
>
> <form jwcid="form1@Form" async="true" updateComponents="container1">
>
> <input type="hidden" jwcid="someNumber@Hidden"
> value="ognl:someNumber" />
>
> <div jwcid="innerContainer@Any">
>
> <select jwcid="@PropertySelection" ...>
> <option>...</option>
> </select>
>
> </div>
>
> ....
>
> </form>
>
> </div>
>
>
> <div jwcid="container2@Any"
>
> <form jwcid="form2@Form" async="true" updateComponents="ognl:
> {'container2', 'innerContainer'}">
>
> ...
> </form>
>
> </div>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org