JSF Showcase

f:loadBundle

f:loadBundle brings the possibility of loading a ResourceBundle into a request scope variable for later use, using the current view Locale.

General Usage

Use varattribute to specify the request scoped variable name. In basename is possible to set the file name, using the same path as if using ResourceBundle getBundle method.
This is a bundle example

Source Code

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

	<f:loadBundle var="myLoadedBundle" basename="myBundle"/>
	<h:outputText value="#{myLoadedBundle['this-is-a-bundle-example']}"/>				

</ui:composition>
this-is-a-bundle-example=This is a bundle example
Liferay Faces Bridge Implementation 4.0.0 + Showcase Common 3.0.0 + Liferay Faces Util 3.0.1-SNAPSHOT + Mojarra 2.2.13