|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.render.Renderer
com.sun.rave.web.ui.renderer.template.TemplateRenderer
public class TemplateRenderer
This renderer is a generic "template-based" renderer. It uses a
LayoutElement
tree as its template and walks this tree. This
renderer will actually delegate the encode functionality to the
LayoutDefinition
object, which is the top of the LayoutElement
in the tree.
This renderer also has the feature of registering Resource
objects to the Request scope prior to rendering its output. This
allows Resource
objects such as ResourceBundles to be added
to the Request scope for easy access.
LayoutDefinition
,
LayoutElement
,
Resource
Constructor Summary | |
---|---|
TemplateRenderer()
|
Method Summary | |
---|---|
void |
decode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Decode any new state of the specified UIComponent from the request contained in the specified FacesContext, and store that state on the UIComponent. |
void |
encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
This method initializes the Resources so they will be available for children. |
void |
encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
This method prevents the super class's default functionality of rendering the child UIComponents. |
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
This method performs the rendering for the TemplateRenderer. |
boolean |
getRendersChildren()
This method returns true. |
Methods inherited from class javax.faces.render.Renderer |
---|
convertClientId, getConvertedValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateRenderer()
Method Detail |
---|
public boolean getRendersChildren()
This method returns true. This method indicates that this
Renderer
will assume resposibilty for rendering its
own children.
getRendersChildren
in class javax.faces.render.Renderer
encodeChildren(FacesContext, UIComponent)
public void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
This method initializes the Resources so they will be available for children. It then calls encodeBegin on the superclass.
encodeBegin
in class javax.faces.render.Renderer
context
- The FacesContextcomponent
- The UIComponent, should be a
TemplateComponent
java.io.IOException
public void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
This method prevents the super class's default functionality of
rendering the child UIComponents. This Renderer
implementation requires that the children be explicitly
rendered. This method does nothing.
encodeChildren
in class javax.faces.render.Renderer
context
- The FacesContext
component
- The UIComponent
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
This method performs the rendering for the TemplateRenderer. It
expects that component be an instanceof TemplateComponent
.
It obtains the LayoutDefinition
from the
TemplateComponent
, initializes the Resource
objects defined by the LayoutDefinition
(if any), and
finally delegates the encoding to the
LayoutDefinition#encode(FacesContext, TemplateComponent)
method of the LayoutDefinition
.
encodeEnd
in class javax.faces.render.Renderer
context
- The FacesContext objectcomponent
- The TemplateComponent
java.io.IOException
public void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
Decode any new state of the specified UIComponent from the request contained in the specified FacesContext, and store that state on the UIComponent.
During decoding, events may be queued for later processing (by
event listeners that have registered an interest), by calling
queueEvent()
on the associated UIComponent.
This implementation of this method invokes the super class and then any handlers that have been registered to process decode functionality. The execution of these handlers is delegated to the LayoutDefinition.
decode
in class javax.faces.render.Renderer
context
- FacesContext for the request we are processingcomponent
- UIComponent to be decoded.
java.lang.NullPointerException
- if context
or component
is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |