Portal 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
Usevar
attribute 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 5.0.0 + Liferay Faces Portal 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20