You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Craig McClanahan <cr...@apache.org> on 2006/02/21 23:14:17 UTC

Re: How to retain form data when disabling input in html:text

On 2/21/06, digant.k.joshi@jpmorgan.com <di...@jpmorgan.com> wrote:
>
> I have <html:text property="bucketName" disabled="true"  size="40"/>
> I populate html:text with data from DB.
> I want to disable input for this property, but
> when I get form data back in Action form bean does not have data for this
> property "bucketName"
>
> How do i retain data after disabling input in html:text.


Short answer ... you cannot.  By defintion in HTML, disabled fields are not
sent to the server, so the server has no opportunity to keep them for you.
On the other hand, if you make the field read only instead of disabled, the
value *will* be sent to the server ... but the user will not be able to edit
it.

Thanks.


Craig


This communication is for informational purposes only. It is not intended
> as an offer or solicitation for the purchase or sale of any financial
> instrument or as an official confirmation of any transaction. All market
> prices,
> data and other information are not warranted as to completeness or
> accuracy and
> are subject to change without notice. Any comments or statements made
> herein
> do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
> and affiliates
>
>
>