struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeromy Evans <jeromy.ev...@blueskyminds.com.au>
Subject Re: [S2] <s:textfield> questions
Date Mon, 04 Jun 2007 10:07:38 GMT
meeboo wrote:
> Hey all
>
> Is there a way to set a default value for a s:textfield? 
<s:textfield name="somefield" value="%{'literal text value'}"/>

<s:textfield name="somefield" value="%{otherPropertyName}"/>

See http://struts.apache.org/2.x/docs/tag-syntax.html
> I am trying
> something like this: <s:textfield name="someField" value="<s:property
> value="someValue" /> but am receiving a TLD error. 
>
>   
<s:textfield name="somefield" value="${someValue}"/> is the equivalent 
of what you have tried, but the approach above is better
> I also discovered that a <s:form> doesn't capture values from disabled input
> fields, now I know that there's already been a bug reported on s:textfield
> not being able to handle the 'disabled' attribute properly, but even if I
> use a standard <input disabled name="someValue"/> the form won't parse the
> value. Is this a bug or expected behaviour?
>
>   
Experiment: Create an html form with a disabled html input and see what 
gets posted

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


Mime
View raw message