2

I know I can put messages used by the "inputEditable" composite component into a .properties file in the directory structure below:

enter image description here

But is there a way for 2 or more composite components to share a .properties file? Say for example, if there is a message or text value that I want common among them all? Or even just 2 of them.

blo0p3r
  • 6,790
  • 8
  • 49
  • 68
citress
  • 889
  • 3
  • 13
  • 35

1 Answers1

1

If you are using this component quite frequently you could load it in a resource bundle and call your properties from there:

<resource-bundle>
    <base-name>com.example.resources.BundleName</base-name>
    <var>inputEditable</var>
</resource-bundle>

And call using #{inputEditable['yourVar']}

Or if it isn't used quite often, you wouldn't need to load it as a resource bundle and you could then load the bundle in your view using <f:loadBundle> and variables called the same way.

See also

Community
  • 1
  • 1
blo0p3r
  • 6,790
  • 8
  • 49
  • 68