They dont submit any parameter in the posted request. As a result, when
struts populates the form, iterating the list of request parameters and
calling the setters with the values it wont call the setter for that one.

The value in the actionform thus depends upon the logic in the forms reset
method - and if that field is not reset, upon the pre-existing value in the
actionform which will remain unchanged. In the case of a request scoped
form, this will of course be a new actionform instance so will give whatever
the forms initial value is when the form is created. (Usually null)

-----Original Message-----
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, 12 February 2004 21:46
To: Struts Users Mailing List
Subject: Re: Getting data from a disabled form field


i believe that disabled form elements return null.

I hate to say it, but you could have the uid stored as a hidden
variable in the case of the non admin user but still display a text
field with the value displayed.


On 12 Feb 2004, at 14:31, Arne Brutschy wrote:

> Hi,
>
> I have a problem with disabled form fields. I'm using a user entry
> form, which fields can be edited by the current user based on his
> group memberships. So a normal user without admin status cannot change
> the uid, as this field is disabled.
>
> My problem is, that after submitting the form, validation fails
> because of the validator which cannot read the uids field context (I
> assume because it's disabled). Trying to get the form data returns an
> empty string.
>
> Anyone encountered this type of problem? Is there any way around it?
>
> Regards,
> Arne
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to