com.sun.jsfcl.app
Class AbstractApplicationBean

java.lang.Object
  extended by com.sun.jsfcl.app.FacesBean
      extended by com.sun.jsfcl.app.AbstractApplicationBean
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.faces.event.PhaseListener

public abstract class AbstractApplicationBean
extends FacesBean

AbstractApplicationBean is the abstract base class for data bean(s) that are stored in application scope attributes. It extends FacesBean, so it inherits all of the default behavior found there.

See Also:
Serialized Form

Field Summary
protected  java.lang.String[][] encoding
          Mapping from the String version of the Locale for this response to the corresponding character encoding.
 
Constructor Summary
AbstractApplicationBean()
          Create a new application scope bean.
 
Method Summary
 java.lang.String getLocaleCharacterEncoding()
          Return an appropriate character encoding based on the Locale defined for the current JavaServer Faces view.
 
Methods inherited from class com.sun.jsfcl.app.FacesBean
afterApplyRequestValues, afterInvokeApplication, afterPhase, afterProcessValidations, afterRenderResponse, afterRestoreView, afterUpdateModelValues, beforeApplyRequestValues, beforeInvokeApplication, beforePhase, beforeProcessValidations, beforeRenderResponse, beforeRestoreView, beforeUpdateModelValues, erase, error, error, fatal, fatal, getApplication, getApplicationMap, getBean, getContext, getExternalContext, getFacesContext, getLifecycle, getPhaseId, getRequestMap, getSessionMap, getValue, info, info, isPostBack, log, log, renderResponse, setBean, setValue, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encoding

protected java.lang.String[][] encoding

Mapping from the String version of the Locale for this response to the corresponding character encoding. For each row, the first String is the value returned by the toString() method for the java.util.Locale for the current view, and the second String is the name of the character encoding to be used.

Only locales that use an encoding other than the default (UTF-8) need to be listed here.

Constructor Detail

AbstractApplicationBean

public AbstractApplicationBean()

Create a new application scope bean.

Method Detail

getLocaleCharacterEncoding

public java.lang.String getLocaleCharacterEncoding()

Return an appropriate character encoding based on the Locale defined for the current JavaServer Faces view. If no more suitable encoding can be found, return "UTF-8" as a general purpose default.

This method makes a convenient value binding target for the value property of a Set Encoding component. Applications that wish to specialize this behavior can override this method in their own application bean class.