struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@blueyonder.co.uk>
Subject Re: bean define tag
Date Fri, 11 Jun 2004 17:12:28 GMT
RE: bean define tagChris is right if a message is not found it outputs the
message key prefixed with the locale key and surrounded by "???". So in your
case looks like it thinks the locale key is "hi".

Another thing...you can use the name/property attributes in <bean:message>
to avoid having to do <bean:define> and use scriptlet...

 <bean:message name="MyVO" property="endTime" />

Niall

----- Original Message ----- 
From: Naresh Sharma
To: Struts Users Mailing List
Sent: Friday, June 11, 2004 1:23 PM
Subject: RE: bean define tag


No. I am only using en_US.
-----Original Message----- 
From: chris.cranford@tkdsoftware.com [mailto:chris.cranford@tkdsoftware.com]
Sent: Friday, June 11, 2004 2:41 PM
To: user@struts.apache.org
Subject: RE: bean define tag
On 6/11/2004 5:08 AM, USER@STRUTS.APACHE.ORG wrote to CHRIS CRANFORD:
Is "hi" the language type, ie: en_US.[resource] is what gets shown on my
install when a message cannot be found in the appropriate
application.properties file for that language.
-> I am reading a value object property and holding in a script variable
-> defined using  bean:define tag.
->
-> <bean:define id="time" name="MyVO" property="endTime" />
->
-> This property "time" actually contains a key to the resource bundle, so
-> passing it to bean:message tag, so it can fetch corresponding key from
-> resource bundle.
->
-> <bean:message key="<%=(String)time%>" />
->
-> But it prints
->
-> "???hi.global.info.label.at???" (without quotation marks),
->
-> Whereas my actual key is  "global.info.label.at", I do understand that in
-> case Struts doesn't find resource it add * character in the key but what
thanks,
chris



--------------------------------------------------------------------- 
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


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


Mime
View raw message