a4j:loadBundle

Component identification parameters

Name | Value
--- | ---
component-type | org.ajax4jsf.Bundle
component-family | org.ajax4jsf.Bundle
component-class | org.ajax4jsf.component.html.AjaxLoadBundle

## Creating on a page

To create the simplest variant on a page use the following syntax:

Example:

    <a4j:loadBundle baseName="demo.bundle.Messages" var="Message"/>

## Creating the Component Dynamically Using Java

Example:

    import org.ajax4jsf.component.html.AjaxLoadBundle;
    ...
    AjaxLoadBundle myBundle = new AjaxLoadBundle();
    ...

## Key attributes and ways of usage

<a4j:loadBundle> allows to use reference to bundle messages during the Ajax re-rendering. <a4j:loadBundle> is a substitute for the <f:loadBundle> in JSF 1.1 which is not a JSF component originally. <f:loadBundle> is a jsp tag that load the bundle messages into the request scope when page is rendered. As soon as each Ajax request works in own request scope, the bundles loaded with <f:loadBundle> are unavailable. Instead of <f:loadBundle> that might be located anywhere on a page, the <a4j:loadBundle> should be declared inside the <f:view> (this does not matter in case on using Facelets) JSF 1.2 introduces the bundle registered in the faces-config.xml. This fixed the problem with <f:loadBundle> . Therefore, you can use this JSF 1.2 way to declare your bundles.

## Relevant resources links

On RichFaces LiveDemo page you can found some additional information for <a4j:loadBundle> component usage.

On RichFaces LiveDemo page you can found some additional information about <f:loadBundle> component.

On RichFaces LiveDemo page you can found some additional information about <f:view> component.