struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: behavior of form fields with disabled status
Date Mon, 27 Aug 2012 05:13:04 GMT
I question why you would want to submit any data that's readonly or
disabled. What's the point? If the user can't enter it, there's
probably a good chance you don't need to receive it -- especially a
"password" field.

Paul

On Sun, Aug 26, 2012 at 11:41 PM, al so <volkswak@gmail.com> wrote:
> looks like readOnly too doesn't seem to post the value to server. The text
> field here is of type s:password.
>
> The javascript that sets it:
> document.getElementById("pwd").readOnly=true
>
> The field becomes readonly on the edit page. But when posted, it's empty on
> the server.
>
> On Sun, Aug 26, 2012 at 8:49 PM, <umeshawasthi@gmail.com> wrote:
>
>> As per HTML spec if you have made the field disabled they will not be
>> submited to the server and I believe this is what happening in your case
>>
>> I believe you can do same by making field readonly and not disabled
>> ------Original Message------
>> From: al so
>> To: Struts Users Mailing List
>> ReplyTo: Struts Users Mailing List
>> Subject: behavior of form fields with disabled status
>> Sent: Aug 27, 2012 8:35 AM
>>
>> A form with bunch of text fields including username and s:password. When
>> these two fields are 'disabled' from editing due to some actions on other
>> fields, the form being submitted will not contain the existing values for
>> these fields. This causes confusion in the backend code into clearing the
>> existing values for login credentials. I read about hidden fields. Is there
>> a sample JSP form to look at?
>>
>>
>>
>> Sent from BlackBerry® on Airtel
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message