You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ignacio de Córdoba <ic...@skios.es> on 2009/05/07 17:28:49 UTC

Re: s:text undesired behaviour - getting action properties in struts 2

Hello,
did you manage to solve this? I don't know if it is the desired behaviour or
it is a bug. It is really annoying getting the property value in place of
the localized text just because they have the same name.
I am in the same situation as you and don't get to find any solution.

Anybody else?

thanks for any help,
Ignacio


Vinicius Cubas Brand wrote:
> 
> Hello. I have an action that haves the method getOperador() . Also, in 
> my messages.properties file with internationalized strings there are two 
> lines:
> 
> 
> operador.telefone=string1
> telefone=string2
> 
> 
> I am using in the jsp the tag
> 
> <s:text name="operador.telefone"></s:text>
> 
> 
> with this I want this 'operador.telefone' string to be translated to 
> 'string1', however it is being translated as 'string2'. This behaviour 
> only happens when the action class running under the jsp haves the 
> getOperador() method.
> 
> I want to know if it is possible to make just the 'operador.telefone' 
> string dont be sensitive to the action's method getOperador().
> 
> Note: I could only try to change the string 'operador.telefone' for 
> something else, however this <s:text > tag is being generated by a 
> automatic translator that searchs jsp files for translatable strings, 
> generating keys and put them into messages.properties.
> 
> 
> Note 2: my web.xml haves the following piece of xml that specifies the 
> messages, just in case you want to know.
> 
>     <context-param>
>         <param-name>
>             javax.servlet.jsp.jstl.fmt.localizationContext
>         </param-name>
>         <param-value>messages</param-value>
>     </context-param>
> 
> Thank in advance for any help/hints.
> 
> Regards
> 
> 
> -- 
> 
> *Vinicius Cubas Brand
> DATAPROM®*
> Software para Clientes
> Tel.: +55 41 3014-1333
> Fax.: +55 41 3014-1201
> 
> vinicius.brand@dataprom.com
> 
> www.dataprom.com
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/s%3Atext-undesired-behaviour---getting-action-properties-in-struts-2-tp19201496p23428536.html
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