You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by asd asd <ja...@easynet.ro> on 2004/04/05 10:58:47 UTC
returns null
Why
<html:text property="aaa" value="bbb" disabled="true"/>
return null?
If I change it with
<html:hiden property="aaa" value="bbb"/>
it will return "bbb"
I use it in a ActionForm with appropriate setter/getter methods.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: returns null
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
<html:text> doesn't return null - it will generate a <input> tag with the
value specified.
When you submit the form however disabled form controls are not submitted -
this is part of the HTML specification and nothing to do with struts. If you
want to show a value, but not allow the user to edit it then use
<bean:write> to show it and a <hidden> tag to have the value submitted with
the form.
Niall
----- Original Message -----
From: "asd asd" <ja...@easynet.ro>
To: <us...@struts.apache.org>
Sent: Monday, April 05, 2004 9:58 AM
Subject: <html:text disabled="true"> returns null
> Why
> <html:text property="aaa" value="bbb" disabled="true"/>
> return null?
>
> If I change it with
> <html:hiden property="aaa" value="bbb"/>
> it will return "bbb"
>
> I use it in a ActionForm with appropriate setter/getter methods.
>
>
> ---------------------------------------------------------------------
> 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