I am displaying the label value from the database which gets displayed properly on the form.
The requirement is that i want to display the form in multiple languages and have created a properties file for the same.
Is there any way, we can retrieve the message properties key from database and display
the label based upon the value from the .properties file.
Eg. Currently the value for field_label in Database is Manufacturer.
Can I store the message properties key in Database , like msg.manufacturer and get the corresponding value from the .properties file.
-- msg.properties --
msg.manufacturer = fabricante
--XHTML--
<p:dataTable id="resultTable" var="result" value="#{RequestBean.dependentFields}">
<p:column>
<f:facet name="header">
<h:outputText value=" " />
</f:facet>
<h:outputText value="#{result.field_label}"/>
</p:column>
You can use the brace notation
[]to reference a dynamic bean/map/resource property in EL.Provided that
#{msg}is your resource bundle file, this should do: