org.richfaces.context

## Class ExtendedPartialViewContextImpl

- java.lang.Object
- - javax.faces.context.PartialViewContext
  - - javax.faces.context.PartialViewContextWrapper
    - - org.richfaces.context.ExtendedPartialViewContext
      - - org.richfaces.context.ExtendedPartialViewContextImpl

- All Implemented Interfaces:
    javax.faces.FacesWrapper<javax.faces.context.PartialViewContext>

      public class ExtendedPartialViewContextImpl
      extends ExtendedPartialViewContext

  The RichFaces custom version of PartialViewContext

  Unfortunately, it is not possible to get the parameters value from inside PartialViewContextFactory (due to encoding issues), so a RichFaces implementation wrapping the original context is created. It either delegates calls to the wrapped context (if the request does not include ‘org.richfaces.ajax.component’ parameter), or it executes the necessary logic (for RichFaces-initiated requests). The detectContextMode() method is responsible for this. Due to this issue we have to re-implement big portion of PartialViewContext functionality in our class.

  Important differences of RichFaces implementation:

  - Values are resolved in runtime by visiting the request activator component and evaluating attributes
  - Usage of extended visit contexts in order to support meta-components processing
  - Support for auto-updateable Ajax components
  - Support for Ajax extensions like passing data to the client
  Author:
    Nick Belaevski

- - ### Field Summary

    - ### Fields inherited from class javax.faces.context.PartialViewContext

      `ALL_PARTIAL_PHASE_CLIENT_IDS, PARTIAL_EXECUTE_PARAM_NAME, PARTIAL_RENDER_PARAM_NAME, RESET_VALUES_PARAM_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExtendedPartialViewContextImpl(javax.faces.context.PartialViewContext wrappedViewContext, javax.faces.context.FacesContext facesContext)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addImplicitExecuteIds(Collection<String> ids)` Adding implicitly executed areas to the list of component that should be executed
    `protected void` | `addImplicitRenderIds(Collection<String> ids, boolean limitRender)` Adding implicitly renderer areas to the list of component that should be rendered
    `protected void` | `addJavaScriptServicePageScripts(javax.faces.context.FacesContext context)` Add scripts collected by `JavaScriptService` as a partial response extension.
    `protected org.richfaces.context.ExtendedPartialViewContextImpl.ContextMode` | `detectContextMode()`
    `protected void` | `executeComponents(javax.faces.event.PhaseId phaseId, Collection<String> executeIds)` Executes tree visiting using callback `PartialViewExecuteVisitCallback` with context `ExecuteExtendedVisitContext`
    `Collection<String>` | `getExecuteIds()`
    `javax.faces.context.PartialResponseWriter` | `getPartialResponseWriter()`
    `Collection<String>` | `getRenderIds()`
    `javax.faces.context.PartialViewContext` | `getWrapped()`
    `boolean` | `isExecuteAll()`
    `boolean` | `isRenderAll()`
    `void` | `processPartial(javax.faces.event.PhaseId phaseId)`
    `protected void` | `processPartialExecutePhase(javax.faces.event.PhaseId phaseId)` Process partial phase method called by `#processPartial()` for all phases except rendering.
    `protected void` | `processPartialRenderPhase()` Process partial phase method called by `#processPartial()` for rendering phase
    `void` | `release()`
    `protected void` | `renderExtensions(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Render RichFaces specific extensions for partial-update such as: beforedumpdate complete render data componentData
    `void` | `setRenderAll(boolean isRenderAll)`

    - ### Methods inherited from class org.richfaces.context.ExtendedPartialViewContext

      `appendOnbeforedomupdate, appendOncomplete, getFacesContext, getInstance, getOnbeforedomupdate, getOncomplete, getResponseComponentDataMap, getResponseData, isLimitRender, prependOnbeforedomupdate, prependOncomplete, setLimitRender, setResponseData`

    - ### Methods inherited from class javax.faces.context.PartialViewContextWrapper

      `isAjaxRequest, isPartialRequest, isResetValues, setPartialRequest`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ExtendedPartialViewContextImpl

          public ExtendedPartialViewContextImpl(javax.faces.context.PartialViewContext wrappedViewContext,
                                        javax.faces.context.FacesContext facesContext)

  - ### Method Detail

    - #### getWrapped

          public javax.faces.context.PartialViewContext getWrapped()

      Specified by:
        `getWrapped` in interface `javax.faces.FacesWrapper<javax.faces.context.PartialViewContext>`
      Overrides:
        `getWrapped` in class `javax.faces.context.PartialViewContextWrapper`

    - #### processPartial

          public void processPartial(javax.faces.event.PhaseId phaseId)

      Overrides:
        `processPartial` in class `javax.faces.context.PartialViewContextWrapper`

    - #### getExecuteIds

          public Collection<String> getExecuteIds()

      Overrides:
        `getExecuteIds` in class `javax.faces.context.PartialViewContextWrapper`

    - #### getRenderIds

          public Collection<String> getRenderIds()

      Overrides:
        `getRenderIds` in class `javax.faces.context.PartialViewContextWrapper`

    - #### isExecuteAll

          public boolean isExecuteAll()

      Overrides:
        `isExecuteAll` in class `javax.faces.context.PartialViewContextWrapper`

    - #### isRenderAll

          public boolean isRenderAll()

      Overrides:
        `isRenderAll` in class `javax.faces.context.PartialViewContextWrapper`

    - #### setRenderAll

          public void setRenderAll(boolean isRenderAll)

      Overrides:
        `setRenderAll` in class `javax.faces.context.PartialViewContextWrapper`

    - #### getPartialResponseWriter

          public javax.faces.context.PartialResponseWriter getPartialResponseWriter()

      Overrides:
        `getPartialResponseWriter` in class `javax.faces.context.PartialViewContextWrapper`

    - #### processPartialExecutePhase

          protected void processPartialExecutePhase(javax.faces.event.PhaseId phaseId)

      Process partial phase method called by `#processPartial()` for all phases except rendering.

    - #### executeComponents

          protected void executeComponents(javax.faces.event.PhaseId phaseId,
                               Collection<String> executeIds)

      Executes tree visiting using callback `PartialViewExecuteVisitCallback` with context `ExecuteExtendedVisitContext`

    - #### processPartialRenderPhase

          protected void processPartialRenderPhase()

      Process partial phase method called by `#processPartial()` for rendering phase

    - #### release

          public void release()

      Overrides:
        `release` in class `ExtendedPartialViewContext`

    - #### addImplicitExecuteIds

          protected void addImplicitExecuteIds(Collection<String> ids)

      Adding implicitly executed areas to the list of component that should be executed

    - #### addImplicitRenderIds

          protected void addImplicitRenderIds(Collection<String> ids,
                                  boolean limitRender)

      Adding implicitly renderer areas to the list of component that should be rendered

    - #### addJavaScriptServicePageScripts

          protected void addJavaScriptServicePageScripts(javax.faces.context.FacesContext context)

      Add scripts collected by `JavaScriptService` as a partial response extension.

    - #### renderExtensions

          protected void renderExtensions(javax.faces.context.FacesContext context,
                              javax.faces.component.UIComponent component)
                                   throws IOException

      Render RichFaces specific extensions for partial-update such as:
      - beforedumpdate
      - complete
      - render
      - data
      - componentData
      Throws:
        `IOException`

    - #### detectContextMode

          protected org.richfaces.context.ExtendedPartialViewContextImpl.ContextMode detectContextMode()

Copyright © 2014 JBoss by Red Hat. All rights reserved.