There are two ways to declare Message Bundle in JSF:
1. Simply configured in faces-config.xml file.
<application>
<resource-bundle>
<base-name>wiki.com.messages</base-name>
<var>message</var>
</resource-bundle>
</application>
2. Use built-in JSF tag to declare Message Bundle. this should be for each and every jsf page. If same message is used for multiple pages then this should not be a good choice.
<f:loadBundle baseName = "wiki.com.messages" var="message"/>
No comments:
Post a Comment