You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Harish Krishnaswamy <hk...@comcast.net> on 2003/11/05 16:19:25 UTC
Handling disabled fields
How are people generally handling disabled fields? The situation is, I have a fields in a form that
are enabled in create mode and some of them are disabled in edit mode. When the page in edit mode is
submitted and rendered back, the values in the disabled fields are lost because they are not sent
back to the server on a submit. How are people handling this situation? I know I could create hidden
fields of these disabled fields, but that would be cumbersome. If this is the only solution, may be
the framework can automate the plumbing. Any ideas?
Thanks,
Harish
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Handling disabled fields
Posted by Harish Krishnaswamy <hk...@comcast.net>.
I am not sure I want to serialize the entire object, my objects are pretty big and that may be
eating up the bandwidth and slowing the response.
Thanks,
Harish
Kevin C. Dorff wrote:
> On my entity add/edit pages I transmit the object in a hidden field. If
> it is an add, the entities key field is -1. After form validation, I go
> to save the entity. If the key field is a -1 it does an insert,
> otherwise it does an update.
>
> This doesn't require hidden fields for specific entity properties.
>
> Help? Make sense?
> Kevin
>
> Harish Krishnaswamy wrote:
>
>> How are people generally handling disabled fields? The situation is, I
>> have a fields in a form that are enabled in create mode and some of
>> them are disabled in edit mode. When the page in edit mode is
>> submitted and rendered back, the values in the disabled fields are
>> lost because they are not sent back to the server on a submit. How are
>> people handling this situation? I know I could create hidden fields of
>> these disabled fields, but that would be cumbersome. If this is the
>> only solution, may be the framework can automate the plumbing. Any ideas?
>>
>> Thanks,
>> Harish
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Handling disabled fields
Posted by "Kevin C. Dorff" <kd...@kcp.com>.
On my entity add/edit pages I transmit the object in a hidden field. If
it is an add, the entities key field is -1. After form validation, I go
to save the entity. If the key field is a -1 it does an insert,
otherwise it does an update.
This doesn't require hidden fields for specific entity properties.
Help? Make sense?
Kevin
Harish Krishnaswamy wrote:
> How are people generally handling disabled fields? The situation is, I
> have a fields in a form that are enabled in create mode and some of
> them are disabled in edit mode. When the page in edit mode is
> submitted and rendered back, the values in the disabled fields are
> lost because they are not sent back to the server on a submit. How are
> people handling this situation? I know I could create hidden fields of
> these disabled fields, but that would be cumbersome. If this is the
> only solution, may be the framework can automate the plumbing. Any ideas?
>
> Thanks,
> Harish
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org