org.apache.myfaces.custom.aliasbean
Class AliasBean

java.lang.Object
  |
  +--javax.faces.component.UIComponent
        |
        +--javax.faces.component.UIComponentBase
              |
              +--org.apache.myfaces.custom.aliasbean.AliasBean
All Implemented Interfaces:
javax.faces.component.StateHolder

public class AliasBean
extends javax.faces.component.UIComponentBase

The aliasBean tag allows you to link a fictive bean to a real bean. Let's suppose you have a subform you use often but with different beans.
The aliasBean allows you to design the subform with a fictive bean and to include it in all the pages where you use it. You just need to make an alias to the real bean named after the fictive bean before invoking the fictive bean.
This making it possible to have a library of reusable generic subforms.

Version:
$Revision: 1.10 $ $Date: 2005/03/15 00:34:17 $ $Log: AliasBean.java,v $ Revision 1.10 2005/03/15 00:34:17 svieujot Close MYFACES-128, thanks to Mathias Broekelmann. Revision 1.9 2005/03/10 22:42:26 svieujot Close MYFACES-125 thanks to Mathias Broekelmann. Revision 1.8 2005/03/10 15:11:00 svieujot Fix MYFACES-125 thanks to Mathias Broekelmann. Revision 1.7 2005/01/27 16:00:30 svieujot *** empty log message *** Revision 1.6 2005/01/27 01:59:45 svieujot AliasBean : Change sourceBean attribute for value. Make it work with both beans references ( #{myBean} ), and fix strings as value. Document tld. Revision 1.5 2005/01/04 15:41:06 svieujot new x:buffer component. Revision 1.4 2004/11/23 11:03:35 svieujot Get ride of the x:aliasBean "permanent" attribute. Revision 1.3 2004/11/23 04:46:40 svieujot Add an ugly "permanent" tag to x:aliasBean to handle children events. Revision 1.2 2004/11/14 15:06:36 svieujot Improve AliasBean to make the alias effective only within the tag body Revision 1.1 2004/11/08 20:43:15 svieujot Add an x:aliasBean component
Author:
Sylvain Vieujot (latest modification by $Author: svieujot $)

Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
 
Constructor Summary
AliasBean()
           
 
Method Summary
 void broadcast(javax.faces.event.FacesEvent event)
           
 java.lang.String getFamily()
           
 java.lang.String getValue()
           
 void processDecodes(javax.faces.context.FacesContext context)
           
 void processRestoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object processSaveState(javax.faces.context.FacesContext context)
           
 void processUpdates(javax.faces.context.FacesContext context)
           
 void processValidators(javax.faces.context.FacesContext context)
           
 void queueEvent(javax.faces.event.FacesEvent event)
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setAlias(java.lang.String aliasBeanExpression)
           
 void setValue(java.lang.String valueExpression)
           
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values
Constructor Detail

AliasBean

public AliasBean()
Method Detail

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class javax.faces.component.UIComponent

setAlias

public void setAlias(java.lang.String aliasBeanExpression)

getValue

public java.lang.String getValue()

setValue

public void setValue(java.lang.String valueExpression)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase

processSaveState

public java.lang.Object processSaveState(javax.faces.context.FacesContext context)
Overrides:
processSaveState in class javax.faces.component.UIComponentBase

processRestoreState

public void processRestoreState(javax.faces.context.FacesContext context,
                                java.lang.Object state)
Overrides:
processRestoreState in class javax.faces.component.UIComponentBase

processValidators

public void processValidators(javax.faces.context.FacesContext context)
Overrides:
processValidators in class javax.faces.component.UIComponentBase

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
Overrides:
processDecodes in class javax.faces.component.UIComponentBase

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)
Overrides:
processUpdates in class javax.faces.component.UIComponentBase

queueEvent

public void queueEvent(javax.faces.event.FacesEvent event)
Overrides:
queueEvent in class javax.faces.component.UIComponentBase

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Overrides:
broadcast in class javax.faces.component.UIComponentBase
javax.faces.event.AbortProcessingException