This is the correct approach. Does the constants.properties file get copied to the deployed archive next to messages.properties?
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.
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
IOW, you're just specifying additional properties files for the org.jboss.seam.core.resourceBundle component.
I was refering to it as
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?
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?