You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by meeboo <de...@gmail.com> on 2007/06/04 11:49:40 UTC

[S2] questions

Hey all

Is there a way to set a default value for a s:textfield? I am trying
something like this: <s:textfield name="someField" value="<s:property
value="someValue" /> but am receiving a TLD error. 

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?

Thanks!
-- 
View this message in context: http://www.nabble.com/-S2--%3Cs%3Atextfield%3E-questions-tf3864087.html#a10946694
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [S2] questions

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
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