Class I18N

java.lang.Object
org.eclnt.jsfserver.i18n.I18N
All Implemented Interfaces:
Serializable, Map<String,String>

public class I18N extends Object implements Map<String,String>, Serializable
Access of localized information that is required within the JSF server processing part of Enterprise Client. This class is instanciated as managed bean with request scope under the name "eclnti18n".

The class does nothing else than delegating the get-method to a ResourceBundle:

public String get(Object key)
{
ResourceBundle rb = ResourceBundle.getBundle(s_bundle,HttpSessionAccess.getCurrentFacesContext().getViewRoot().getLocale());
return rb.getString(key.toString());
}


All other functions of Map are not implemented, i.e. this is pure read-only map in which only the get-method is implemented. As consequence it can be nicely used in expressions, e.g. "#{eclnt18n.OKPopup_ok}".

You can override this class by overriding the s_bundle member in the constructor of your class and point it to your resource bundle.

Attention: keys must not contain any "." because this is interpreted as property separator by JSF expressions.
See Also: