RichFaces UI Components UI 4.2.2.Final

org.richfaces.renderkit
Class RendererBase

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by org.richfaces.renderkit.RendererBase
Direct Known Subclasses:
AbstractRowsRenderer, AjaxCommandRendererBase, AjaxOutputPanelRenderer, AjaxPollRenderer, AjaxStatusRenderer, CollapsibleSubTableTogglerRendererBase, ContextMenuRendererBase, DataScrollerBaseRenderer, DivPanelRenderer, DnDRenderBase, DragIndicatorRendererBase, DropDownMenuRendererBase, FileUploadRendererBase, InputRendererBase, LogRendererBase, MediaOutputRenderer, MenuGroupRendererBase, MenuSeparatorRendererBase, MessageRendererBase, NotifyRendererBase, NotifyStackRendererBase, PanelBaseRenderer, PopupPanelBaseRenderer, ProgressBarBaseRenderer, 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 $)

Constructor Summary
RendererBase()
           
 
Method Summary
 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  org.richfaces.skin.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.
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 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 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 void encodeChildren(javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component)
                    throws IOException
Overrides:
encodeChildren in class javax.faces.render.Renderer
Throws:
IOException

encodeEnd

public 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 org.richfaces.skin.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 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 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 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)

RichFaces UI Components UI 4.2.2.Final

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