loadBundle

You are viewing an old version (v. 1) of this page.
The latest version is v. 3, last edited on Nov 21, 2014 (view differences | )
view page history | view next version >>

Overview

You can use the icecore:loadBundle tag to load a resource bundle to be used for locale specific messages. The defined bundle is completely dynamic, meaning that if any of its attribute change at any time there will be no need to reload the page, session or application.

Getting Started

To use the icecore:loadBundle tag, first declare the core namespace:

<html ... xmlns:icecore="http://www.icefaces.org/icefaces/core">

Then add the tag to your page markup wiring the action to the bean method:

<h:form id="form"> 
    ... 
    <icecore:loadBundle var="wizardMessages" basename="com.bla.T.wizard.Messages"/>     
    ... 
</h:form>

The component can be define anywhere in the document as long as it is defined before the components that use the bundle.

<h:body> 
    <icecore:loadBundle var="wizardMessages" basename="com.bla.T.wizard.Messages"/>     
    ... 
    <h:outputText value="#{wizardMessages.title}"/>     
    ...
    <h:commandButton label="#{wizardMessages.nextStep}" ... />     
    ... 
</h:form>

Attributes

var Use this attribute to specify the name of the EL variable that will be used to referenced the defined bundle. This attribute can be dynamically redefined, so a value binding will work as well.

basename Use this attribute to specify the fully qualified name of the ResourceBundle class that will be instantiated in order to serve up the localised message. If the class is not found a resource bundle properties file is looked up instead. See more about how resource bundles work: http://docs.oracle.com/javase/7/docs/api/java/util/ResourceBundle.html . This attribute can be dynamically redefined, so a value binding will work as well.

The loadBundle tag was added in ICEfaces 4.0.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2017 ICEsoft Technologies Canada Corp.