|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
org.apache.myfaces.trinidad.component.UIXComponent
org.apache.myfaces.trinidad.component.UIXComponentBase
public abstract class UIXComponentBase
Base implementation of components for all of Trinidad. UIXComponentBase offers a number of features not supplied by the standard UIComponentBase class:
UIXComponentBase differs from UIXComponent most particularly in its use of FacesBeans to store all state. This offers a number of advantages:
| Field Summary | |
|---|---|
static PropertyKey |
BINDING_KEY
|
static PropertyKey |
ID_KEY
|
static PropertyKey |
RENDERED_KEY
|
static PropertyKey |
RENDERER_TYPE_KEY
|
static PropertyKey |
TRANSIENT_KEY
|
static FacesBean.Type |
TYPE
|
| Constructor Summary | |
|---|---|
UIXComponentBase()
|
|
UIXComponentBase(java.lang.String rendererType)
|
|
| Method Summary | |
|---|---|
protected void |
addAttributeChange(java.lang.String attributeName,
java.lang.Object attributeValue)
|
void |
addAttributeChangeListener(AttributeChangeListener acl)
Adds an AttributeChangeListener. |
protected void |
addFacesListener(javax.faces.event.FacesListener listener)
|
void |
broadcast(javax.faces.event.FacesEvent event)
|
protected void |
broadcastToMethodBinding(javax.faces.event.FacesEvent event,
javax.faces.el.MethodBinding method)
Broadcast an event to a MethodBinding. |
protected FacesBean |
createFacesBean(java.lang.String rendererType)
|
void |
decode(javax.faces.context.FacesContext context)
|
protected void |
decodeChildren(javax.faces.context.FacesContext context)
Delegates to LifecycleRenderer, if present, otherwise calls decodeChildrenImpl. |
protected void |
decodeChildrenImpl(javax.faces.context.FacesContext context)
Calls processDecodes on all facets and children of this component. |
void |
encodeAll(javax.faces.context.FacesContext context)
Encodes a component and all of its children, whether getRendersChildren() is true or false. |
void |
encodeBegin(javax.faces.context.FacesContext context)
|
void |
encodeChildren(javax.faces.context.FacesContext context)
|
void |
encodeEnd(javax.faces.context.FacesContext context)
|
javax.faces.component.UIComponent |
findComponent(java.lang.String id)
|
javax.faces.el.MethodBinding |
getAttributeChangeListener()
Gets the method binding to an AttributeChangeListener. |
AttributeChangeListener[] |
getAttributeChangeListeners()
Gets the registered AttributeChangeListeners. |
java.util.Map |
getAttributes()
|
protected FacesBean.Type |
getBeanType()
|
protected boolean |
getBooleanProperty(PropertyKey key,
boolean defaultValue)
|
int |
getChildCount()
|
java.util.List |
getChildren()
Create (if necessary) and return a List of the children associated with this component. |
java.lang.String |
getClientId(javax.faces.context.FacesContext context)
|
FacesBean |
getFacesBean()
Returns the FacesBean used for storing the component's state. |
protected javax.faces.context.FacesContext |
getFacesContext()
Return the FacesContext instance for the current request. |
protected javax.faces.event.FacesListener[] |
getFacesListeners(java.lang.Class clazz)
|
javax.faces.component.UIComponent |
getFacet(java.lang.String facetName)
|
int |
getFacetCount()
Return the number of facets. |
java.util.Iterator<java.lang.String> |
getFacetNames()
Returns an Iterator over the names of all facets. |
java.util.Map |
getFacets()
Create (if necessary) and return a Map of the facets associated with this component. |
java.util.Iterator |
getFacetsAndChildren()
|
abstract java.lang.String |
getFamily()
|
java.lang.String |
getId()
Gets the identifier for the component. |
protected int |
getIntProperty(PropertyKey key,
int defaultValue)
|
protected LifecycleRenderer |
getLifecycleRenderer(javax.faces.context.FacesContext context)
|
protected java.lang.String |
getLocalClientId()
Returns the default local client identifier, relative to the current naming container. |
javax.faces.component.UIComponent |
getParent()
|
protected java.lang.Object |
getProperty(PropertyKey key)
|
protected PropertyKey |
getPropertyKey(java.lang.String name)
|
protected javax.faces.render.Renderer |
getRenderer(javax.faces.context.FacesContext context)
|
java.lang.String |
getRendererType()
|
boolean |
getRendersChildren()
|
javax.faces.el.ValueBinding |
getValueBinding(java.lang.String name)
|
boolean |
isRendered()
|
boolean |
isTransient()
|
void |
markInitialState()
|
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 |
removeAttributeChangeListener(AttributeChangeListener acl)
Removes an AttributeChangeListener. |
protected void |
removeFacesListener(javax.faces.event.FacesListener listener)
|
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object stateObj)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setAttributeChangeListener(javax.faces.el.MethodBinding mb)
Sets a method binding to an AttributeChangeListener. |
protected void |
setBooleanProperty(PropertyKey key,
boolean value)
|
void |
setId(java.lang.String id)
Sets the identifier for the component. |
protected void |
setIntProperty(PropertyKey key,
int value)
|
void |
setParent(javax.faces.component.UIComponent parent)
Set the parent UIComponent of this
UIComponent. |
protected void |
setProperty(PropertyKey key,
java.lang.Object value)
|
void |
setRendered(boolean rendered)
|
void |
setRendererType(java.lang.String rendererType)
|
void |
setTransient(boolean newTransient)
|
void |
setValueBinding(java.lang.String name,
javax.faces.el.ValueBinding binding)
|
java.lang.String |
toString()
|
protected void |
updateChildren(javax.faces.context.FacesContext context)
Delegates to LifecycleRenderer, if present, otherwise calls upateChildrenImpl. |
protected void |
updateChildrenImpl(javax.faces.context.FacesContext context)
|
protected void |
validateChildren(javax.faces.context.FacesContext context)
Delegates to LifecycleRenderer, if present, otherwise calls validateChildrenImpl. |
protected void |
validateChildrenImpl(javax.faces.context.FacesContext context)
Calls processValidators on all facets and children of this component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final FacesBean.Type TYPE
public static final PropertyKey ID_KEY
public static final PropertyKey RENDERED_KEY
public static final PropertyKey BINDING_KEY
public static final PropertyKey TRANSIENT_KEY
public static final PropertyKey RENDERER_TYPE_KEY
| Constructor Detail |
|---|
public UIXComponentBase()
public UIXComponentBase(java.lang.String rendererType)
| Method Detail |
|---|
protected FacesBean createFacesBean(java.lang.String rendererType)
protected PropertyKey getPropertyKey(java.lang.String name)
protected FacesBean.Type getBeanType()
public FacesBean getFacesBean()
UIXComponent
getFacesBean in class UIXComponentpublic void addAttributeChangeListener(AttributeChangeListener acl)
UIXComponent
addAttributeChangeListener in class UIXComponentpublic void removeAttributeChangeListener(AttributeChangeListener acl)
UIXComponent
removeAttributeChangeListener in class UIXComponentpublic AttributeChangeListener[] getAttributeChangeListeners()
UIXComponent
getAttributeChangeListeners in class UIXComponentpublic void setAttributeChangeListener(javax.faces.el.MethodBinding mb)
UIXComponent
setAttributeChangeListener in class UIXComponentpublic javax.faces.el.MethodBinding getAttributeChangeListener()
UIXComponent
getAttributeChangeListener in class UIXComponentpublic javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
getValueBinding in class javax.faces.component.UIComponent
public void setValueBinding(java.lang.String name,
javax.faces.el.ValueBinding binding)
setValueBinding in class javax.faces.component.UIComponentpublic java.util.Map getAttributes()
getAttributes in class UIXComponentpublic java.lang.String getClientId(javax.faces.context.FacesContext context)
getClientId in class javax.faces.component.UIComponentpublic java.lang.String getId()
getId in class javax.faces.component.UIComponentpublic void setId(java.lang.String id)
setId in class javax.faces.component.UIComponentpublic abstract java.lang.String getFamily()
getFamily in class javax.faces.component.UIComponentpublic javax.faces.component.UIComponent getParent()
getParent in class javax.faces.component.UIComponentpublic void setParent(javax.faces.component.UIComponent parent)
Set the parent UIComponent of this
UIComponent.
setParent in class javax.faces.component.UIComponentparent - The new parent, or null for the root node
of a component treepublic boolean isRendered()
isRendered in class javax.faces.component.UIComponentpublic void setRendered(boolean rendered)
setRendered in class javax.faces.component.UIComponentpublic boolean isTransient()
isTransient in interface javax.faces.component.StateHolderisTransient in class UIXComponentpublic void setTransient(boolean newTransient)
setTransient in interface javax.faces.component.StateHoldersetTransient in class UIXComponentpublic java.lang.String getRendererType()
getRendererType in class javax.faces.component.UIComponentpublic void setRendererType(java.lang.String rendererType)
setRendererType in class javax.faces.component.UIComponentpublic boolean getRendersChildren()
getRendersChildren in class javax.faces.component.UIComponentpublic javax.faces.component.UIComponent findComponent(java.lang.String id)
findComponent in class javax.faces.component.UIComponentpublic java.util.List getChildren()
Create (if necessary) and return a List of the children associated with this component.
getChildren in class UIXComponentpublic int getChildCount()
getChildCount in class javax.faces.component.UIComponentpublic java.util.Map getFacets()
Create (if necessary) and return a Map of the facets associated with this component.
getFacets in class UIXComponentpublic javax.faces.component.UIComponent getFacet(java.lang.String facetName)
getFacet in class javax.faces.component.UIComponentpublic java.util.Iterator<java.lang.String> getFacetNames()
public java.util.Iterator getFacetsAndChildren()
getFacetsAndChildren in class UIXComponent
public void broadcast(javax.faces.event.FacesEvent event)
throws javax.faces.event.AbortProcessingException
broadcast in class javax.faces.component.UIComponentjavax.faces.event.AbortProcessingExceptionpublic void decode(javax.faces.context.FacesContext context)
decode in class javax.faces.component.UIComponent
public void encodeBegin(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeBegin in class javax.faces.component.UIComponentjava.io.IOException
public void encodeChildren(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeChildren in class javax.faces.component.UIComponentjava.io.IOException
public void encodeEnd(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeEnd in class javax.faces.component.UIComponentjava.io.IOException
public void encodeAll(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeAll in class UIXComponentjava.io.IOExceptionpublic void queueEvent(javax.faces.event.FacesEvent event)
queueEvent in class javax.faces.component.UIComponentpublic void processDecodes(javax.faces.context.FacesContext context)
processDecodes in class javax.faces.component.UIComponentpublic void processValidators(javax.faces.context.FacesContext context)
processValidators in class javax.faces.component.UIComponentpublic void processUpdates(javax.faces.context.FacesContext context)
processUpdates in class javax.faces.component.UIComponentpublic java.lang.Object processSaveState(javax.faces.context.FacesContext context)
processSaveState in class javax.faces.component.UIComponent
public void processRestoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
processRestoreState in class javax.faces.component.UIComponentpublic void markInitialState()
markInitialState in class UIXComponentpublic java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class UIXComponent
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object stateObj)
restoreState in interface javax.faces.component.StateHolderrestoreState in class UIXComponentpublic java.lang.String toString()
toString in class java.lang.Objectprotected javax.faces.context.FacesContext getFacesContext()
Return the FacesContext instance for the current request.
getFacesContext in class javax.faces.component.UIComponentprotected final void decodeChildren(javax.faces.context.FacesContext context)
context - the current FacesContextprotected void decodeChildrenImpl(javax.faces.context.FacesContext context)
context - the current FacesContextprotected final void validateChildren(javax.faces.context.FacesContext context)
context - the current FacesContextprotected void validateChildrenImpl(javax.faces.context.FacesContext context)
context - the current FacesContextprotected final void updateChildren(javax.faces.context.FacesContext context)
context - the current FacesContextprotected void updateChildrenImpl(javax.faces.context.FacesContext context)
protected void addFacesListener(javax.faces.event.FacesListener listener)
addFacesListener in class javax.faces.component.UIComponentprotected void removeFacesListener(javax.faces.event.FacesListener listener)
removeFacesListener in class javax.faces.component.UIComponentprotected javax.faces.event.FacesListener[] getFacesListeners(java.lang.Class clazz)
getFacesListeners in class UIXComponent
protected void addAttributeChange(java.lang.String attributeName,
java.lang.Object attributeValue)
protected javax.faces.render.Renderer getRenderer(javax.faces.context.FacesContext context)
getRenderer in class javax.faces.component.UIComponentprotected LifecycleRenderer getLifecycleRenderer(javax.faces.context.FacesContext context)
protected void setProperty(PropertyKey key,
java.lang.Object value)
protected java.lang.Object getProperty(PropertyKey key)
protected void setBooleanProperty(PropertyKey key,
boolean value)
protected boolean getBooleanProperty(PropertyKey key,
boolean defaultValue)
protected void setIntProperty(PropertyKey key,
int value)
protected int getIntProperty(PropertyKey key,
int defaultValue)
protected java.lang.String getLocalClientId()
public int getFacetCount()
getFacetCount in class UIXComponent
protected final void broadcastToMethodBinding(javax.faces.event.FacesEvent event,
javax.faces.el.MethodBinding method)
throws javax.faces.event.AbortProcessingException
javax.faces.event.AbortProcessingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||