org.apache.myfaces.trinidad.render

## Interface ExtendedRenderKitService

-     public interface ExtendedRenderKitService

  Service implemented by RenderKits that provide further support for per-page rendering actions, like including scripts global to a page or short-circuiting rendering altogether. Developers should always retrieve an instance using `Service.getService(java.lang.Object, java.lang.Class<T>)`, passing in the current RenderKit, or with `Service.getRenderKitService(javax.faces.context.FacesContext, java.lang.Class<T>)`,

  Example: The following code will add a script to be rendered during the following request:

          ExtendedRenderKitService service =
            Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
          service.addScript(facesContext, "alert('foo');");

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addScript(javax.faces.context.FacesContext context, String script)` Adds a script for execution during rendering.
    `void` | `encodeBegin(javax.faces.context.FacesContext context)` Called when the encoding of a page begins.
    `void` | `encodeEnd(javax.faces.context.FacesContext context)` Called when the encoding of a page ends, if there were no exceptions.
    `void` | `encodeFinally(javax.faces.context.FacesContext context)` Called when the encoding of a page completes, whether or not there were exceptions.
    `void` | `encodeScripts(javax.faces.context.FacesContext context)` Output any needed scripts required by the RenderKit for this page.
    `boolean` | `isStateless(javax.faces.context.FacesContext context)`
    `boolean` | `shortCircuitRenderView(javax.faces.context.FacesContext context)` Called to short-circuit rendering the view.

- - ### Method Detail

    - #### addScript

          void addScript(javax.faces.context.FacesContext context,
                       String script)

      Adds a script for execution during rendering.

    - #### encodeScripts

          void encodeScripts(javax.faces.context.FacesContext context)
                             throws IOException

      Output any needed scripts required by the RenderKit for this page.
      Throws:
        `IOException`

    - #### shortCircuitRenderView

          boolean shortCircuitRenderView(javax.faces.context.FacesContext context)
                                         throws IOException

      Called to short-circuit rendering the view. A ViewHandler should call this method before rendering the view (for example, before forwarding to a JSP), and if it returns true, do nothing further.
      Throws:
        `IOException`

    - #### isStateless

          boolean isStateless(javax.faces.context.FacesContext context)

    - #### encodeBegin

          void encodeBegin(javax.faces.context.FacesContext context)
                           throws IOException

      Called when the encoding of a page begins.
      Throws:
        `IOException`

    - #### encodeEnd

          void encodeEnd(javax.faces.context.FacesContext context)
                         throws IOException

      Called when the encoding of a page ends, if there were no exceptions.
      Throws:
        `IOException`

    - #### encodeFinally

          void encodeFinally(javax.faces.context.FacesContext context)

      Called when the encoding of a page completes, whether or not there were exceptions.

Copyright © 2001-2016 The Apache Software Foundation. All Rights Reserved.