org.richfaces.renderkit

## Class RendererBase

- java.lang.Object
- - javax.faces.render.Renderer
  - - org.richfaces.renderkit.RendererBase

- Direct Known Subclasses:
    AbstractRowsRenderer, AjaxCommandRendererBase, AjaxOutputPanelRenderer, AjaxPollRenderer, AjaxStatusRenderer, ChartRendererBase, CollapsibleSubTableTogglerRendererBase, ContextMenuRendererBase, DataScrollerBaseRenderer, DivPanelRenderer, DnDRenderBase, DragIndicatorRendererBase, DropDownMenuRendererBase, FileUploadRendererBase, FocusRendererBase, InputRendererBase, ListRendererBase, LogRendererBase, MediaOutputRenderer, MenuGroupRendererBase, MenuSeparatorRendererBase, MessageRendererBase, NotifyRendererBase, NotifyStackRendererBase, PanelBaseRenderer, PlaceholderRendererBase, PopupPanelBaseRenderer, ProgressBarBaseRenderer, PushRendererBase, ToolbarRendererBase, TreeNodeRendererBase, TreeRendererBase

      public abstract class RendererBase
      extends javax.faces.render.Renderer

  Base Renderer for all chameleon Skin's and components. At most, make all common procedures and realise concrete work in "template" methods.
  Version:
    $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:51 $
  Author:
    asmirnov@exadel.com (latest modification by $Author: alexsmirnov $)

- - ### Field Summary

    - ### Fields inherited from class javax.faces.render.Renderer

      `PASSTHROUGH_RENDERER_LOCALNAME_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RendererBase()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `concatClasses(Object... objects)`
    `String` | `concatStyles(Object... objects)`
    `void` | `decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
    `protected void` | `doDecode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Template method for custom decoding of concrete renderer.
    `protected void` | `doEncodeBegin(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Template method for custom start encoding of concrete renderer.
    `protected void` | `doEncodeChildren(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
    `protected void` | `doEncodeEnd(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Template method for custom finish encoding of concrete renderer.
    `void` | `encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
    `void` | `encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
    `void` | `encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
    `protected Class<? extends javax.faces.component.UIComponent>` | `getComponentClass()` Get base component slass , targetted for this renderer.
    `String` | `getResourcePath(javax.faces.context.FacesContext context, String library, String resourceName)`
    `protected Skin` | `getSkin(javax.faces.context.FacesContext context)` Calculate current Skin for rendering.
    `RendererUtils` | `getUtils()` Due to big number of common utility methods, base renderer divide to 2 classes - renderer and utils.
    `boolean` | `isAlreadyRendered(javax.faces.component.UIComponent component)`
    `protected void` | `preDecode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
    `protected void` | `preEncodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
    `protected void` | `queueComponentEventForBehaviorEvent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String eventName)`
    `void` | `renderChildren(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)` Render all children for given component.

    - ### Methods inherited from class javax.faces.render.Renderer

      `convertClientId, getConvertedValue, getRendersChildren`

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

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

- - ### Constructor Detail

    - #### RendererBase

          public RendererBase()

  - ### Method Detail

    - #### decode

          public final void decode(javax.faces.context.FacesContext context,
                    javax.faces.component.UIComponent component)

      Overrides:
        `decode` in class `javax.faces.render.Renderer`

    - #### queueComponentEventForBehaviorEvent

          protected void queueComponentEventForBehaviorEvent(javax.faces.context.FacesContext context,
                                                 javax.faces.component.UIComponent component,
                                                 String eventName)

    - #### preDecode

          protected void preDecode(javax.faces.context.FacesContext context,
                       javax.faces.component.UIComponent component)

    - #### preEncodeBegin

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

      Throws:
        `IOException`

    - #### encodeBegin

          public final void encodeBegin(javax.faces.context.FacesContext context,
                         javax.faces.component.UIComponent component)
                                 throws IOException

      Overrides:
        `encodeBegin` in class `javax.faces.render.Renderer`
      Throws:
        `IOException`

    - #### encodeChildren

          public final void encodeChildren(javax.faces.context.FacesContext context,
                            javax.faces.component.UIComponent component)
                                    throws IOException

      Overrides:
        `encodeChildren` in class `javax.faces.render.Renderer`
      Throws:
        `IOException`

    - #### isAlreadyRendered

          public boolean isAlreadyRendered(javax.faces.component.UIComponent component)

    - #### encodeEnd

          public final void encodeEnd(javax.faces.context.FacesContext context,
                       javax.faces.component.UIComponent component)
                               throws IOException

      Overrides:
        `encodeEnd` in class `javax.faces.render.Renderer`
      Throws:
        `IOException`

    - #### getSkin

          protected Skin getSkin(javax.faces.context.FacesContext context)

      Calculate current Skin for rendering.
      Parameters:
        `context` - - current `FacesContext`
      Returns:

    - #### getUtils

          public RendererUtils getUtils()

      Due to big number of common utility methods, base renderer divide to 2 classes - renderer and utils. since use static methods of utility class breack object paradigm, we use getter for concrete util instance. Developer can override any utility metod in 2 stages : 1) Create subclass of `RendererUtils` and override utility method. 2) Override this method for return instance of such subclass.
      Returns:
        Returns the utils.

    - #### getComponentClass

          protected Class<? extends javax.faces.component.UIComponent> getComponentClass()

      Get base component slass , targetted for this renderer. Used for check arguments in decode/encode.
      Returns:

    - #### doDecode

          protected void doDecode(javax.faces.context.FacesContext context,
                      javax.faces.component.UIComponent component)

      Template method for custom decoding of concrete renderer. All parameters checking if performed in original `decode(FacesContext, UIComponent)` method.
      Parameters:
        `context` -
        `component` -

    - #### doEncodeBegin

          protected void doEncodeBegin(javax.faces.context.ResponseWriter writer,
                           javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component)
                                throws IOException

      Template method for custom start encoding of concrete renderer. All parameters checking and writer is performed in original `encodeBegin(FacesContext, UIComponent)` method.
      Parameters:
        `writer` -
        `context` -
        `component` -
      Throws:
        `IOException`

    - #### doEncodeChildren

          protected void doEncodeChildren(javax.faces.context.ResponseWriter writer,
                              javax.faces.context.FacesContext context,
                              javax.faces.component.UIComponent component)
                                   throws IOException

      Parameters:
        `writer` -
        `context` -
        `component` -
      Throws:
        `IOException`

    - #### doEncodeEnd

          protected void doEncodeEnd(javax.faces.context.ResponseWriter writer,
                         javax.faces.context.FacesContext context,
                         javax.faces.component.UIComponent component)
                              throws IOException

      Template method for custom finish encoding of concrete renderer. All parameters checking and writer is performed in original `encodeEnd(FacesContext, UIComponent)` method.
      Parameters:
        `writer` -
        `context` -
        `component` -
      Throws:
        `IOException`

    - #### renderChildren

          public void renderChildren(javax.faces.context.FacesContext facesContext,
                            javax.faces.component.UIComponent component)
                              throws IOException

      Render all children for given component.
      Parameters:
        `facesContext` -
        `component` -
      Throws:
        `IOException`

    - #### concatClasses

          public String concatClasses(Object... objects)

    - #### concatStyles

          public String concatStyles(Object... objects)

    - #### getResourcePath

          public String getResourcePath(javax.faces.context.FacesContext context,
                               String library,
                               String resourceName)

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.