org.ajax4jsf.component
Class AjaxViewRoot
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIViewRoot
org.ajax4jsf.component.AjaxViewRoot
- All Implemented Interfaces:
- javax.faces.component.StateHolder, org.ajax4jsf.component.AjaxContainer, org.ajax4jsf.component.AjaxContainerBase, org.ajax4jsf.event.AjaxSource
public class AjaxViewRoot
- extends javax.faces.component.UIViewRoot
- implements org.ajax4jsf.component.AjaxContainer
Custom ViewRoot for support render parts of tree for Ajax requests. Main
difference from default ViewRoot - store events queue and unique id counter
in request-scope variables. In common realisation, store request-scope
variables in component produce errors in case of concurrent requests to same
view.
- Version:
- $Revision: 1.1.2.4 $ $Date: 2007/02/28 17:01:01 $
- Author:
- asmirnov@exadel.com (latest modification by $Author: alexsmirnov $)
|
Field Summary |
static java.lang.String |
ROOT_ID
|
| Fields inherited from class javax.faces.component.UIViewRoot |
COMPONENT_FAMILY, COMPONENT_TYPE, UNIQUE_ID_PREFIX |
| Fields inherited from class javax.faces.component.UIComponent |
bindings |
| Methods inherited from class javax.faces.component.UIViewRoot |
createUniqueId, getAfterPhaseListener, getBeforePhaseListener, getFamily, getLocale, getRenderKitId, setAfterPhaseListener, setBeforePhaseListener, setLocale, setRenderKitId, setViewId |
| Methods inherited from class javax.faces.component.UIComponentBase |
addFacesListener, decode, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
| Methods inherited from class javax.faces.component.UIComponent |
encodeAll, getContainerClientId, getValueExpression, setValueExpression |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROOT_ID
public static final java.lang.String ROOT_ID
- See Also:
- Constant Field Values
AjaxViewRoot
public AjaxViewRoot()
getRendererType
public java.lang.String getRendererType()
- Overrides:
getRendererType 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
- Throws:
javax.faces.event.AbortProcessingException
getAjaxListener
public javax.el.MethodExpression getAjaxListener()
- Specified by:
getAjaxListener in interface org.ajax4jsf.component.AjaxContainerBase
isImmediate
public boolean isImmediate()
- Specified by:
isImmediate in interface org.ajax4jsf.component.AjaxContainerBase
isSubmitted
public boolean isSubmitted()
- Specified by:
isSubmitted in interface org.ajax4jsf.component.AjaxContainerBase
removePhaseListener
public void removePhaseListener(javax.faces.event.PhaseListener toRemove)
- Overrides:
removePhaseListener in class javax.faces.component.UIViewRoot
addPhaseListener
public void addPhaseListener(javax.faces.event.PhaseListener newPhaseListener)
- Overrides:
addPhaseListener in class javax.faces.component.UIViewRoot
processPhaseListeners
protected void processPhaseListeners(javax.faces.context.FacesContext context,
javax.faces.event.PhaseId phase,
boolean before)
- Send notification to a view-scope phase listeners.
- Parameters:
context - phase - before -
createPhaseEvent
protected javax.faces.event.PhaseEvent createPhaseEvent(javax.faces.context.FacesContext context,
javax.faces.event.PhaseId phaseId)
throws javax.faces.FacesException
- Throws:
javax.faces.FacesException
processPhase
protected void processPhase(javax.faces.context.FacesContext context,
javax.faces.event.PhaseId phase,
InvokerCallback callback)
queueEvent
public void queueEvent(javax.faces.event.FacesEvent event)
- Overrides:
queueEvent in class javax.faces.component.UIViewRoot
processEvents
public void processEvents(javax.faces.context.FacesContext context,
EventsQueue phaseEventsQueue,
boolean havePhaseEvents)
- Parameters:
context - TODOphaseEventsQueue - havePhaseEvents -
broadcastAjaxEvents
public void broadcastAjaxEvents(javax.faces.context.FacesContext context)
getEventsQueue
protected EventsQueue getEventsQueue(javax.faces.event.PhaseId phase)
- Use FIFO buffers for hold Faces Events. Hold this buffers in Request
scope parameters for support any concurrent requests for same component
tree ( since RI hold component tree in session ).
- Parameters:
phase -
- Returns:
getEvents
protected EventsQueue[] getEvents()
- Returns:
getAjaxEventsQueue
protected EventsQueue getAjaxEventsQueue()
- Special Fifo Buffer for ajax events to Render Responce phase.
- Returns:
clearEvents
public void clearEvents()
processDecodes
public void processDecodes(javax.faces.context.FacesContext context)
- Overrides:
processDecodes in class javax.faces.component.UIViewRoot
processUpdates
public void processUpdates(javax.faces.context.FacesContext context)
- Overrides:
processUpdates in class javax.faces.component.UIViewRoot
processValidators
public void processValidators(javax.faces.context.FacesContext context)
- Overrides:
processValidators in class javax.faces.component.UIViewRoot
processApplication
public void processApplication(javax.faces.context.FacesContext context)
- Overrides:
processApplication in class javax.faces.component.UIViewRoot
encodeBegin
public void encodeBegin(javax.faces.context.FacesContext context)
throws java.io.IOException
- Overrides:
encodeBegin in class javax.faces.component.UIViewRoot
- Throws:
java.io.IOException
encodeEnd
public void encodeEnd(javax.faces.context.FacesContext context)
throws java.io.IOException
- Overrides:
encodeEnd in class javax.faces.component.UIViewRoot
- Throws:
java.io.IOException
encodeChildren
public void encodeChildren(javax.faces.context.FacesContext context)
throws java.io.IOException
- Overrides:
encodeChildren in class javax.faces.component.UIComponentBase
- Throws:
java.io.IOException
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.UIViewRoot
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.UIViewRoot
getViewId
public java.lang.String getViewId()
- Overrides:
getViewId in class javax.faces.component.UIViewRoot
setAjaxListener
public void setAjaxListener(javax.el.MethodExpression ajaxListener)
- Specified by:
setAjaxListener in interface org.ajax4jsf.component.AjaxContainerBase
setImmediate
public void setImmediate(boolean immediate)
- Specified by:
setImmediate in interface org.ajax4jsf.component.AjaxContainerBase
setSubmitted
public void setSubmitted(boolean submitted)
- Specified by:
setSubmitted in interface org.ajax4jsf.component.AjaxContainerBase
addAjaxListener
public void addAjaxListener(org.ajax4jsf.event.AjaxListener listener)
- Specified by:
addAjaxListener in interface org.ajax4jsf.event.AjaxSource
getAjaxListeners
public org.ajax4jsf.event.AjaxListener[] getAjaxListeners()
- Specified by:
getAjaxListeners in interface org.ajax4jsf.event.AjaxSource
removeAjaxListener
public void removeAjaxListener(org.ajax4jsf.event.AjaxListener listener)
- Specified by:
removeAjaxListener in interface org.ajax4jsf.event.AjaxSource
isSelfRendered
public boolean isSelfRendered()
- Specified by:
isSelfRendered in interface org.ajax4jsf.component.AjaxContainerBase
setSelfRendered
public void setSelfRendered(boolean selfRendered)
- Specified by:
setSelfRendered in interface org.ajax4jsf.component.AjaxContainerBase
getRendersChildren
public boolean getRendersChildren()
- Overrides:
getRendersChildren in class javax.faces.component.UIComponentBase
isRenderRegionOnly
public boolean isRenderRegionOnly()
- Specified by:
isRenderRegionOnly in interface org.ajax4jsf.component.AjaxContainer
setRenderRegionOnly
public void setRenderRegionOnly(boolean reRenderPage)
- Specified by:
setRenderRegionOnly in interface org.ajax4jsf.component.AjaxContainer
encodeAjax
public void encodeAjax(javax.faces.context.FacesContext context)
throws java.io.IOException
- Specified by:
encodeAjax in interface org.ajax4jsf.component.AjaxContainer
- Throws:
java.io.IOException
getBrige
protected AjaxRegionBrige getBrige()
- Returns:
- the brige
Copyright © 2009. All Rights Reserved.