|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.render.Renderer
org.ajax4jsf.renderkit.RendererBase
public abstract class RendererBase
Base Renderer for all chameleon Skin's and components. At most, make all common procedures and realise concrete work in "template" methods.
Field Summary | |
---|---|
protected static java.lang.String |
JAVASCRIPT_NAMESPACE
logger for common cases. |
Constructor Summary | |
---|---|
RendererBase()
|
Method Summary | |
---|---|
protected void |
addResource(java.lang.String key,
org.ajax4jsf.resource.InternetResource resource)
Append new resource to renderer cache. |
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 abstract java.lang.Class<? extends javax.faces.component.UIComponent> |
getComponentClass()
Get base component slass , targetted for this renderer. |
org.ajax4jsf.resource.InternetResource |
getResource(java.lang.String resourceURI)
Base stub method for produce internet resource ( image, script ... |
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)
|
void |
renderChild(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent child)
Render one component and it childrens |
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 |
Field Detail |
---|
protected static final java.lang.String JAVASCRIPT_NAMESPACE
Constructor Detail |
---|
public RendererBase()
Method Detail |
---|
public void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
decode
in class javax.faces.render.Renderer
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) throws java.io.IOException
java.io.IOException
public void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeBegin
in class javax.faces.render.Renderer
java.io.IOException
public void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeChildren
in class javax.faces.render.Renderer
java.io.IOException
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeEnd
in class javax.faces.render.Renderer
java.io.IOException
public org.ajax4jsf.resource.InternetResource getResource(java.lang.String resourceURI) throws javax.faces.FacesException
getResource
in interface org.ajax4jsf.resource.ResourceProduser
resourceURI
- - relative ( to renderer class ) uri to resource in jar or
key for generate ( in Java2D , for example ).
org.ajax4jsf.resource.ResourceNotFoundException
- - if reqested resource not instantiated.
javax.faces.FacesException
protected org.richfaces.skin.Skin getSkin(javax.faces.context.FacesContext context)
context
- - current FacesContext
public RendererUtils getUtils()
RendererUtils
and override utility method.
2) Override this method for return instance of such subclass.
protected abstract java.lang.Class<? extends javax.faces.component.UIComponent> getComponentClass()
protected void doDecode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
decode
method.
context
- component
- protected void doEncodeBegin(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeBegin
method.
writer
- context
- component
-
java.io.IOException
protected void doEncodeChildren(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
writer
- context
- component
-
java.io.IOException
protected void doEncodeEnd(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeEnd
method.
writer
- context
- component
-
java.io.IOException
protected void addResource(java.lang.String key, org.ajax4jsf.resource.InternetResource resource)
key
- resource
- public void renderChildren(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component) throws java.io.IOException
facesContext
- component
-
java.io.IOException
public void renderChild(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent child) throws java.io.IOException
facesContext
- child
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |