• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

logic:equals tag and globalization help

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Ravi.
-Milind
SCJP 2
 
You learn how to close your eyes and tell yourself "this just isn't really happening to me." Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic