org.apache.myfaces.view.facelets.tag.composite
Class ClientBehaviorRedirectEventComponentWrapper
java.lang.Object
javax.faces.component.UIComponent
org.apache.myfaces.view.facelets.tag.composite.ClientBehaviorRedirectEventComponentWrapper
- All Implemented Interfaces:
- EventListener, ClientBehaviorHolder, PartialStateHolder, StateHolder, TransientStateHolder, ComponentSystemEventListener, FacesListener, SystemEventListenerHolder, FacesWrapper<UIComponent>
public class ClientBehaviorRedirectEventComponentWrapper
- extends UIComponent
- implements FacesWrapper<UIComponent>, ClientBehaviorHolder
This class has two usages:
1. On ClientBehaviorAttachedObjectTargetImpl to redirect the incoming sourceEvent
to the final targetEvent.
2. On FaceletsViewDeclarationLanguage.retargetAttachedObjects to redirect too, but
this time is to allow chain events for nested composite components.
This class also implements FacesWrapper interface, to make possible to retrieve the
real component if necessary.
- Version:
- $Revision: 1189343 $ $Date: 2011-10-26 17:53:36 +0000 (Wed, 26 Oct 2011) $
- Author:
- Leonardo Uribe (latest modification by $Author: struberg $)
Method Summary |
void |
addClientBehavior(String eventName,
ClientBehavior behavior)
|
protected void |
addFacesListener(FacesListener listener)
|
void |
broadcast(FacesEvent event)
|
void |
clearInitialState()
|
void |
decode(FacesContext context)
|
void |
encodeAll(FacesContext context)
|
void |
encodeBegin(FacesContext context)
|
void |
encodeChildren(FacesContext context)
|
void |
encodeEnd(FacesContext context)
|
UIComponent |
findComponent(String expr)
|
Map<String,Object> |
getAttributes()
|
int |
getChildCount()
|
List<UIComponent> |
getChildren()
|
Map<String,List<ClientBehavior>> |
getClientBehaviors()
|
String |
getClientId()
|
String |
getClientId(FacesContext context)
|
String |
getContainerClientId(FacesContext ctx)
|
String |
getDefaultEventName()
|
Collection<String> |
getEventNames()
|
protected FacesContext |
getFacesContext()
|
protected FacesListener[] |
getFacesListeners(Class clazz)
|
UIComponent |
getFacet(String name)
|
int |
getFacetCount()
|
Map<String,UIComponent> |
getFacets()
|
Iterator<UIComponent> |
getFacetsAndChildren()
|
String |
getFamily()
|
String |
getId()
|
List<SystemEventListener> |
getListenersForEventClass(Class<? extends SystemEvent> eventClass)
|
UIComponent |
getNamingContainer()
|
UIComponent |
getParent()
|
protected Renderer |
getRenderer(FacesContext context)
|
String |
getRendererType()
|
boolean |
getRendersChildren()
|
Map<String,String> |
getResourceBundleMap()
|
ValueBinding |
getValueBinding(String name)
|
javax.el.ValueExpression |
getValueExpression(String name)
|
UIComponent |
getWrapped()
|
boolean |
initialStateMarked()
|
boolean |
invokeOnComponent(FacesContext context,
String clientId,
ContextCallback callback)
|
boolean |
isInView()
|
boolean |
isRendered()
|
boolean |
isTransient()
|
void |
markInitialState()
|
void |
processDecodes(FacesContext context)
|
void |
processEvent(ComponentSystemEvent event)
|
void |
processRestoreState(FacesContext context,
Object state)
|
Object |
processSaveState(FacesContext context)
|
void |
processUpdates(FacesContext context)
|
void |
processValidators(FacesContext context)
|
void |
queueEvent(FacesEvent event)
|
protected void |
removeFacesListener(FacesListener listener)
|
void |
restoreState(FacesContext context,
Object state)
|
Object |
saveState(FacesContext context)
|
void |
setId(String id)
|
void |
setInView(boolean isInView)
|
void |
setParent(UIComponent parent)
|
void |
setRendered(boolean rendered)
|
void |
setRendererType(String rendererType)
|
void |
setTransient(boolean newTransientValue)
|
void |
setValueBinding(String name,
ValueBinding binding)
|
void |
setValueExpression(String name,
javax.el.ValueExpression expression)
|
void |
subscribeToEvent(Class<? extends SystemEvent> eventClass,
ComponentSystemEventListener componentListener)
|
void |
unsubscribeFromEvent(Class<? extends SystemEvent> eventClass,
ComponentSystemEventListener componentListener)
|
boolean |
visitTree(VisitContext context,
VisitCallback callback)
|
Methods inherited from class javax.faces.component.UIComponent |
getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClientBehaviorRedirectEventComponentWrapper
public ClientBehaviorRedirectEventComponentWrapper(UIComponent delegate,
String sourceEvent,
String targetEvent)
getWrapped
public UIComponent getWrapped()
- Specified by:
getWrapped
in interface FacesWrapper<UIComponent>
addClientBehavior
public void addClientBehavior(String eventName,
ClientBehavior behavior)
- Specified by:
addClientBehavior
in interface ClientBehaviorHolder
getClientBehaviors
public Map<String,List<ClientBehavior>> getClientBehaviors()
- Specified by:
getClientBehaviors
in interface ClientBehaviorHolder
getDefaultEventName
public String getDefaultEventName()
- Specified by:
getDefaultEventName
in interface ClientBehaviorHolder
getEventNames
public Collection<String> getEventNames()
- Specified by:
getEventNames
in interface ClientBehaviorHolder
broadcast
public void broadcast(FacesEvent event)
throws AbortProcessingException
- Specified by:
broadcast
in class UIComponent
- Throws:
AbortProcessingException
clearInitialState
public void clearInitialState()
- Specified by:
clearInitialState
in interface PartialStateHolder
- Overrides:
clearInitialState
in class UIComponent
decode
public void decode(FacesContext context)
- Specified by:
decode
in class UIComponent
encodeAll
public void encodeAll(FacesContext context)
throws IOException
- Overrides:
encodeAll
in class UIComponent
- Throws:
IOException
encodeBegin
public void encodeBegin(FacesContext context)
throws IOException
- Specified by:
encodeBegin
in class UIComponent
- Throws:
IOException
encodeChildren
public void encodeChildren(FacesContext context)
throws IOException
- Specified by:
encodeChildren
in class UIComponent
- Throws:
IOException
encodeEnd
public void encodeEnd(FacesContext context)
throws IOException
- Specified by:
encodeEnd
in class UIComponent
- Throws:
IOException
findComponent
public UIComponent findComponent(String expr)
- Specified by:
findComponent
in class UIComponent
getAttributes
public Map<String,Object> getAttributes()
- Specified by:
getAttributes
in class UIComponent
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in class UIComponent
getChildren
public List<UIComponent> getChildren()
- Specified by:
getChildren
in class UIComponent
getClientId
public String getClientId()
- Overrides:
getClientId
in class UIComponent
getClientId
public String getClientId(FacesContext context)
- Specified by:
getClientId
in class UIComponent
getContainerClientId
public String getContainerClientId(FacesContext ctx)
- Overrides:
getContainerClientId
in class UIComponent
getFacet
public UIComponent getFacet(String name)
- Specified by:
getFacet
in class UIComponent
getFacetCount
public int getFacetCount()
- Overrides:
getFacetCount
in class UIComponent
getFacets
public Map<String,UIComponent> getFacets()
- Specified by:
getFacets
in class UIComponent
getFacetsAndChildren
public Iterator<UIComponent> getFacetsAndChildren()
- Specified by:
getFacetsAndChildren
in class UIComponent
getFamily
public String getFamily()
- Specified by:
getFamily
in class UIComponent
getId
public String getId()
- Specified by:
getId
in class UIComponent
getListenersForEventClass
public List<SystemEventListener> getListenersForEventClass(Class<? extends SystemEvent> eventClass)
- Specified by:
getListenersForEventClass
in interface SystemEventListenerHolder
- Overrides:
getListenersForEventClass
in class UIComponent
getNamingContainer
public UIComponent getNamingContainer()
- Overrides:
getNamingContainer
in class UIComponent
getParent
public UIComponent getParent()
- Specified by:
getParent
in class UIComponent
getRendererType
public String getRendererType()
- Specified by:
getRendererType
in class UIComponent
getRendersChildren
public boolean getRendersChildren()
- Specified by:
getRendersChildren
in class UIComponent
getResourceBundleMap
public Map<String,String> getResourceBundleMap()
- Overrides:
getResourceBundleMap
in class UIComponent
getValueBinding
public ValueBinding getValueBinding(String name)
- Specified by:
getValueBinding
in class UIComponent
getValueExpression
public javax.el.ValueExpression getValueExpression(String name)
- Overrides:
getValueExpression
in class UIComponent
initialStateMarked
public boolean initialStateMarked()
- Specified by:
initialStateMarked
in interface PartialStateHolder
- Overrides:
initialStateMarked
in class UIComponent
invokeOnComponent
public boolean invokeOnComponent(FacesContext context,
String clientId,
ContextCallback callback)
throws FacesException
- Overrides:
invokeOnComponent
in class UIComponent
- Throws:
FacesException
isInView
public boolean isInView()
- Overrides:
isInView
in class UIComponent
isRendered
public boolean isRendered()
- Specified by:
isRendered
in class UIComponent
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interface StateHolder
markInitialState
public void markInitialState()
- Specified by:
markInitialState
in interface PartialStateHolder
- Overrides:
markInitialState
in class UIComponent
processDecodes
public void processDecodes(FacesContext context)
- Specified by:
processDecodes
in class UIComponent
processEvent
public void processEvent(ComponentSystemEvent event)
throws AbortProcessingException
- Specified by:
processEvent
in interface ComponentSystemEventListener
- Overrides:
processEvent
in class UIComponent
- Throws:
AbortProcessingException
processRestoreState
public void processRestoreState(FacesContext context,
Object state)
- Specified by:
processRestoreState
in class UIComponent
processSaveState
public Object processSaveState(FacesContext context)
- Specified by:
processSaveState
in class UIComponent
processUpdates
public void processUpdates(FacesContext context)
- Specified by:
processUpdates
in class UIComponent
processValidators
public void processValidators(FacesContext context)
- Specified by:
processValidators
in class UIComponent
queueEvent
public void queueEvent(FacesEvent event)
- Specified by:
queueEvent
in class UIComponent
restoreState
public void restoreState(FacesContext context,
Object state)
- Specified by:
restoreState
in interface StateHolder
saveState
public Object saveState(FacesContext context)
- Specified by:
saveState
in interface StateHolder
setId
public void setId(String id)
- Specified by:
setId
in class UIComponent
setInView
public void setInView(boolean isInView)
- Overrides:
setInView
in class UIComponent
setParent
public void setParent(UIComponent parent)
- Specified by:
setParent
in class UIComponent
setRendered
public void setRendered(boolean rendered)
- Specified by:
setRendered
in class UIComponent
setRendererType
public void setRendererType(String rendererType)
- Specified by:
setRendererType
in class UIComponent
setTransient
public void setTransient(boolean newTransientValue)
- Specified by:
setTransient
in interface StateHolder
setValueBinding
public void setValueBinding(String name,
ValueBinding binding)
- Specified by:
setValueBinding
in class UIComponent
setValueExpression
public void setValueExpression(String name,
javax.el.ValueExpression expression)
- Overrides:
setValueExpression
in class UIComponent
subscribeToEvent
public void subscribeToEvent(Class<? extends SystemEvent> eventClass,
ComponentSystemEventListener componentListener)
- Overrides:
subscribeToEvent
in class UIComponent
unsubscribeFromEvent
public void unsubscribeFromEvent(Class<? extends SystemEvent> eventClass,
ComponentSystemEventListener componentListener)
- Overrides:
unsubscribeFromEvent
in class UIComponent
visitTree
public boolean visitTree(VisitContext context,
VisitCallback callback)
- Overrides:
visitTree
in class UIComponent
getFacesContext
protected FacesContext getFacesContext()
- Specified by:
getFacesContext
in class UIComponent
addFacesListener
protected void addFacesListener(FacesListener listener)
- Specified by:
addFacesListener
in class UIComponent
getFacesListeners
protected FacesListener[] getFacesListeners(Class clazz)
- Specified by:
getFacesListeners
in class UIComponent
getRenderer
protected Renderer getRenderer(FacesContext context)
- Specified by:
getRenderer
in class UIComponent
removeFacesListener
protected void removeFacesListener(FacesListener listener)
- Specified by:
removeFacesListener
in class UIComponent
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.