Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  java.util.EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.UniqueIdVendor, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, 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, METADATA_FACET_NAME, UNIQUE_ID_PREFIX, VIEW_PARAMETERS_KEY`

Fields inherited from class javax.faces.component.UIComponent
`BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY`

Constructor Summary
`AjaxViewRoot()`

Method Summary
`void` | `addAjaxListener(org.ajax4jsf.event.AjaxListener listener)`
`void` | `addPhaseListener(javax.faces.event.PhaseListener newPhaseListener)`
`void` | `broadcast(javax.faces.event.FacesEvent event)`
`void` | `broadcastAjaxEvents(javax.faces.context.FacesContext context)`
`void` | `broadcastEvents(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)` Broadcast events for specified Phase
`void` | `clearEvents()`
`protected javax.faces.event.PhaseEvent` | `createPhaseEvent(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)`
`void` | `encodeAjax(javax.faces.context.FacesContext context)`
`void` | `encodeBegin(javax.faces.context.FacesContext context)`
`void` | `encodeChildren(javax.faces.context.FacesContext context)`
`void` | `encodeEnd(javax.faces.context.FacesContext context)`
`protected EventsQueue` | `getAjaxEventsQueue()` Special Fifo Buffer for ajax events to Render Responce phase.
`javax.el.MethodExpression` | `getAjaxListener()`
`org.ajax4jsf.event.AjaxListener[]` | `getAjaxListeners()`
`protected AjaxRegionBrige` | `getBrige()`
`protected EventsQueue[]` | `getEvents()`
`protected EventsQueue` | `getEventsQueue(javax.faces.event.PhaseId phase)` Use FIFO buffers for hold Faces Events.
`java.lang.String` | `getRendererType()`
`boolean` | `getRendersChildren()`
`java.lang.String` | `getViewId()`
`boolean` | `isImmediate()`
`boolean` | `isRenderRegionOnly()`
`boolean` | `isSelfRendered()`
`boolean` | `isSubmitted()`
`void` | `processApplication(javax.faces.context.FacesContext context)`
`void` | `processDecodes(javax.faces.context.FacesContext context)`
`void` | `processEvents(javax.faces.context.FacesContext context, EventsQueue phaseEventsQueue, boolean havePhaseEvents)`
`protected void` | `processPhase(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phase, InvokerCallback callback)`
`protected void` | `processPhaseListeners(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phase, boolean before)` Send notification to a view-scope phase listeners.
`void` | `processUpdates(javax.faces.context.FacesContext context)`
`void` | `processValidators(javax.faces.context.FacesContext context)`
`void` | `queueEvent(javax.faces.event.FacesEvent event)`
`void` | `removeAjaxListener(org.ajax4jsf.event.AjaxListener listener)`
`void` | `removePhaseListener(javax.faces.event.PhaseListener toRemove)`
`void` | `restoreState(javax.faces.context.FacesContext context, java.lang.Object state)`
`java.lang.Object` | `saveState(javax.faces.context.FacesContext context)`
`void` | `setAjaxListener(javax.el.MethodExpression ajaxListener)`
`void` | `setImmediate(boolean immediate)`
`void` | `setRenderRegionOnly(boolean reRenderPage)`
`void` | `setSelfRendered(boolean selfRendered)`
`void` | `setSubmitted(boolean submitted)`

Methods inherited from class javax.faces.component.UIViewRoot
`addComponentResource, addComponentResource, createUniqueId, createUniqueId, getAfterPhaseListener, getBeforePhaseListener, getComponentResources, getFamily, getLocale, getPhaseListeners, getRenderKitId, getViewListenersForEventClass, getViewMap, getViewMap, isInView, processRestoreState, removeComponentResource, removeComponentResource, setAfterPhaseListener, setBeforePhaseListener, setInView, setLocale, setRenderKitId, setViewId, subscribeToViewEvent, unsubscribeFromViewEvent`

Methods inherited from class javax.faces.component.UIComponentBase
`addClientBehavior, addFacesListener, clearInitialState, decode, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding`

Methods inherited from class javax.faces.component.UIComponent
`encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setValueExpression, subscribeToEvent, unsubscribeFromEvent, visitTree`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ROOT_ID

    public static final java.lang.String ROOT_ID

See Also:
  Constant Field Values

Constructor Detail

### AjaxViewRoot

    public AjaxViewRoot()

Method Detail

### 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`

### broadcastEvents

    public void broadcastEvents(javax.faces.context.FacesContext context,
                                javax.faces.event.PhaseId phaseId)

  Broadcast events for specified Phase

  Overrides:
    `broadcastEvents` in class `javax.faces.component.UIViewRoot`
  Parameters:
    `context` -
    `phaseId` - - phase, for which events must be processed.

### processEvents

    public void processEvents(javax.faces.context.FacesContext context,
                              EventsQueue phaseEventsQueue,
                              boolean havePhaseEvents)

  Parameters:
    `context` - TODO
    `phaseEventsQueue` -
    `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.UIViewRoot`
  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.UIViewRoot`

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.