Hi Kelly,
By coincidence I'm investigating this precise issue at the moment and
have discussed it in the strust-dev list within the last 24 hours. The
algorithm to find keys in s:text differs from s:textfield which causes
inconsistent behaviour -sometimes-.
Some questions:
Which version of struts2 are you using?
Where is your resource bundle?
Does your action extend ActionSupport?
Please let me know if you get it working and what changed.
The issue:
s:textfield searches for a method getText(String) somewhere in the value
stack. s:text searches for a TextProvider (like ActionSupport) in the
value stack and calls getText(String). Something in your configuration
means the first approach doesn't find the resource but the second
approach does. It's hard to replicate.
Kelly.Graus wrote:
Hello,
I'm trying to use the key attribute in the s:textfield tag to display a
label from my resource bundle. I have a single application resource bundle
that I am able to access with the s:text tag, so I know the resource bundle
is working. However, when I use the key attribute, I just get an empty
string as the label.
This works:
<s:text name="user.firstname"/>
This doesn't display the label:
<s:textfield key="user.firstname" name="..."/>
Does anyone have any ideas?
Thanks!
Kelly
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]