-
1. Re: Including a resource bundle not called messages*
pmuir Feb 19, 2008 9:57 PM (in response to dam)This is the correct approach. Does the constants.properties file get copied to the deployed archive next to messages.properties?
-
2. Re: Including a resource bundle not called messages*
dam Feb 19, 2008 10:09 PM (in response to dam)Yes it does.
Just found out that if I put this in the view
<f:loadBundle basename="constants" var="constants"/>
I have access to it. But I would also like to have access to it, from the beans.
-
3. Re: Including a resource bundle not called messages*
jimk1723 Feb 19, 2008 10:18 PM (in response to dam)How are you referencing the properties?
I can set up a new resource bundle in components.xml named mycompany_messages.properties
<core:resource-loader> <core:bundle-names> <value>mycompany_messages</value> </core:bundle-names> </core:resource-loader>
But I still reference it in the JSF as
<h:outputText value="#{messages['mylabel']}"/>
...not...
<h:outputText value="#{mycompany_messages['mylabel']}"/>
IOW, you're just specifying additional properties files for the org.jboss.seam.core.resourceBundle component.
-
4. Re: Including a resource bundle not called messages*
dam Feb 19, 2008 10:33 PM (in response to dam)I was refering to it as
#{constants.foo}
because I thought of constants as a separate map, so that explains it:)
By the way is it possible to have more than one map?
-
5. Re: Including a resource bundle not called messages*
pmuir Feb 19, 2008 10:52 PM (in response to dam)No.
-
6. Re: Including a resource bundle not called messages*
invincible_virus Jun 29, 2012 9:01 AM (in response to pmuir)I bumped into this old thread for same problem with seam 2.2.2.final.
I could access the value using messages map. Just to confirm, Seam supports only one map and thus if I define a property in multiple resource bundles; then, the value I get will prely depend on which bundle is loaded last.
It seems too restrictive to me. Is there any reason for such a design?