wood burning stoves 2.0*
The moose likes Struts and the fly likes logic:equals tag and globalization help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:equals tag and globalization help " Watch "logic:equals tag and globalization help " New topic
Author

logic:equals tag and globalization help

Milind Mahajan
Ranch Hand

Joined: Oct 23, 2000
Posts: 77
Hello,
Can 'value' attribute of logic:equals tag be globalized ? I mean is it possible to pick the value of 'value' attribute from resourcebundles ? I tried with <bean:message key='key1'> which is used to pick messages from messagebundle. But it is used only to print the message to the output stream not to 'assign' to value attribute or any java variable. Can somebody help ?
Thanks a lot.
-Milind
SCJP2
Ravi Veera
Ranch Hand

Joined: Jun 23, 2001
Posts: 127
You cannot directly use bean:message directly.
An indirect way of using it would be through a scriptlet.
something like this.
<% String sValue;
//Read from Resource bundle and assign it to sValue
%>
and in the iterate tag you could say
value="<%=sValue%>"
If you plan to use it in a lot of places you could move the scriptlet code into your own custom tag and then work on it.
Milind Mahajan
Ranch Hand

Joined: Oct 23, 2000
Posts: 77
Thanks a lot Ravi.
-Milind
SCJP 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logic:equals tag and globalization help
 
Similar Threads
logic:equal
&gt;html:text &lt; default value
h:commandLink Alternative
getting titles from resource bundle when using display:table tag
simple struts conditional?