1.

How To Declare The Message Bundle In Jsf?

Answer»

We can declare the message BUNDLE in TWO ways: 
(LET’s assume com.developersBookJsf.messages is the properties file)
1.  The simplest way is to include the following elements in faces-config.xml file:
<application>
<resource-bundle>
<base-name>com.developersBookJsf.messages</base-name>
<var>message</var>
</resource-bundle>
</application>
2.  Alternatively, you can add the f:loadBundle element to each JSF page that needs access to the bundle:
<f:loadBundle baseName = “com.developersBookJsf.messages” var=”message”/>

We can declare the message bundle in two ways: 
(Let’s assume com.developersBookJsf.messages is the properties file)
1.  The simplest way is to include the following elements in faces-config.xml file:
<application>
<resource-bundle>
<base-name>com.developersBookJsf.messages</base-name>
<var>message</var>
</resource-bundle>
</application>
2.  Alternatively, you can add the f:loadBundle element to each JSF page that needs access to the bundle:
<f:loadBundle baseName = “com.developersBookJsf.messages” var=”message”/>



Discussion

No Comment Found