Save This Page
Home » tomahawk-1.1.6-src » org.apache.myfaces » custom » aliasbean » [javadoc | source]
org.apache.myfaces.custom.aliasbean
public class: AliasBean [javadoc | source]
java.lang.Object
   javax.faces.component.UIComponentBase
      org.apache.myfaces.custom.aliasbean.AliasBean

All Implemented Interfaces:
    BindingAware

The aliasBean tag allows you to create a temporary name for a real bean. The temporary name exists (is visible) only to the children of the aliasBean.

Suppose you have a block of components you use often but with different beans. The aliasBean allows you to create a separate JSP page (or equivalent) containing these beans, where the value-bindings refer to some fictive bean name. Wherever you wish to use this block you then declare an alias component mapping the fictive name to whatever bean you really want to apply the block to, then use jsp:include (or equivalent) to include the reusable block of components. This makes it possible to have a library of reusable generic subforms.

Note, however, that AliasBean does not work for component bindings; JSF1.1 just has no mechanism available to set up the alias during the "restore view" phase while the bindings of its children are being re-established, and then remove the alias after the child bindings are done.

Field Summary
public static final  String COMPONENT_TYPE     
public static final  String COMPONENT_FAMILY     
Constructor:
 public AliasBean() 
Method from org.apache.myfaces.custom.aliasbean.AliasBean Summary:
broadcast,   encodeBegin,   encodeEnd,   getFamily,   getRendererType,   getValue,   handleBindings,   makeAlias,   processDecodes,   processRestoreState,   processSaveState,   processUpdates,   processValidators,   queueEvent,   removeAlias,   restoreState,   saveState,   setAlias,   setValue
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.myfaces.custom.aliasbean.AliasBean Detail:
 public  void broadcast(FacesEvent event) throws AbortProcessingException 
 public  void encodeBegin(FacesContext context) throws IOException 
 public  void encodeEnd(FacesContext context) throws IOException 
 public String getFamily() 
 public String getRendererType() 
 public String getValue() 
 public  void handleBindings() 
  void makeAlias(FacesContext context) 
 public  void processDecodes(FacesContext context) 
 public  void processRestoreState(FacesContext context,
    Object state) 
 public Object processSaveState(FacesContext context) 
 public  void processUpdates(FacesContext context) 
 public  void processValidators(FacesContext context) 
 public  void queueEvent(FacesEvent event) 
  void removeAlias(FacesContext context) 
 public  void restoreState(FacesContext context,
    Object state) 
 public Object saveState(FacesContext context) 
 public  void setAlias(String aliasBeanExpression) 
    Define the "fictive" name which will be visible to the children of this component as an alias to the "real" object specified by the value attribute of this component.
 public  void setValue(String valueExpression)