Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.struts.faces.renderer
Class AbstractRenderer  view AbstractRenderer download AbstractRenderer.java

java.lang.Object
  extended byjavax.faces.render.Renderer
      extended byorg.apache.struts.faces.renderer.AbstractRenderer
Direct Known Subclasses:
BaseRenderer, CommandLinkRenderer, ErrorsRenderer, FormRenderer, HtmlRenderer, StylesheetRenderer, WriteRenderer

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

Abstract base class for concrete implementations of javax.faces.render.Renderer for the Struts-Faces Integration Library.

Version:
$Rev: 54934 $ $Date: 2004-10-16 18:07:50 +0100 (Sat, 16 Oct 2004) $

Field Summary
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
AbstractRenderer()
           
 
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)
          Render the beginning of the specified UIComponent to the output stream or writer associated with the response we are creating.
 void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Render the children of the specified UIComponent to the output stream or writer associated with the response we are creating.
 void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Render the ending of the specified UIComponent to the output stream or writer associated with the response we are creating.
protected  void encodeRecursive(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Render nested child components by invoking the encode methods on those components, but only when the rendered property is true.
protected  java.lang.String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          Convert the Object representation of this component's value to the corresponding String representation.
protected  boolean isDisabled(javax.faces.component.UIComponent component)
          Return true if the specified component is disabled.
protected  boolean isReadOnly(javax.faces.component.UIComponent component)
          Return true if the specified component is read only.
protected  void renderAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer)
          Render the element attributes for the generated markup related to this component.
protected  void renderBoolean(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer, java.lang.String[] names)
          Render any boolean attributes on the specified list that have true values on the corresponding attribute of the specified UIComponent.
protected  void renderEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer)
          Render the element end for the generated markup related to this component.
protected  void renderPassThrough(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer, java.lang.String[] names)
          Render any attributes on the specified list directly to the specified ResponseWriter for which the specified UIComponent has a non-null attribute value.
protected  void renderStart(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter writer)
          Render the element start for the generated markup related to this component.
protected  void setSubmittedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          If a submitted value was included on this request, store it in the component as appropriate.
 
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

log

private static final org.apache.commons.logging.Log log
Constructor Detail

AbstractRenderer

public AbstractRenderer()
Method Detail

decode

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.

The default implementation calls setSubmittedValue() unless this component has a boolean disabled or readonly attribute that is set to true.


encodeBegin

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

Render the beginning of the specified UIComponent to the output stream or writer associated with the response we are creating.

The default implementation calls renderStart() and renderAttributes().


encodeChildren

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

Render the children of the specified UIComponent to the output stream or writer associated with the response we are creating.

The default implementation iterates through the children of this component and renders them.


encodeEnd

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

Render the ending of the specified UIComponent to the output stream or writer associated with the response we are creating.

The default implementation calls renderEnd().


encodeRecursive

protected void encodeRecursive(javax.faces.context.FacesContext context,
                               javax.faces.component.UIComponent component)
                        throws java.io.IOException

Render nested child components by invoking the encode methods on those components, but only when the rendered property is true.


isDisabled

protected boolean isDisabled(javax.faces.component.UIComponent component)

Return true if the specified component is disabled.


isReadOnly

protected boolean isReadOnly(javax.faces.component.UIComponent component)

Return true if the specified component is read only.


renderAttributes

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

Render the element attributes for the generated markup related to this component. Simple renderers that create a single markup element for this component should override this method and include calls to to writeAttribute() and writeURIAttribute on the specified ResponseWriter.

The default implementation does nothing.


renderEnd

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

Render the element end for the generated markup related to this component. Simple renderers that create a single markup element for this component should override this method and include a call to endElement() on the specified ResponseWriter.

The default implementation does nothing.


renderBoolean

protected void renderBoolean(javax.faces.context.FacesContext context,
                             javax.faces.component.UIComponent component,
                             javax.faces.context.ResponseWriter writer,
                             java.lang.String[] names)
                      throws java.io.IOException

Render any boolean attributes on the specified list that have true values on the corresponding attribute of the specified UIComponent.


renderPassThrough

protected void renderPassThrough(javax.faces.context.FacesContext context,
                                 javax.faces.component.UIComponent component,
                                 javax.faces.context.ResponseWriter writer,
                                 java.lang.String[] names)
                          throws java.io.IOException

Render any attributes on the specified list directly to the specified ResponseWriter for which the specified UIComponent has a non-null attribute value. This method may be used to "pass through" commonly used attribute name/value pairs with a minimum of code.


renderStart

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

Render the element start for the generated markup related to this component. Simple renderers that create a single markup element for this component should override this method and include a call to startElement() on the specified ResponseWriter.

The default implementation does nothing.


setSubmittedValue

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

If a submitted value was included on this request, store it in the component as appropriate.

The default implementation determines whether this component implements EditableValueHolder. If so, it checks for a request parameter with the same name as the clientId of this UIComponent. If there is such a parameter, its value is passed (as a String) to the setSubmittedValue() method on the EditableValueHolder component.


getAsString

protected java.lang.String getAsString(javax.faces.context.FacesContext context,
                                       javax.faces.component.UIComponent component,
                                       java.lang.Object value)
                                throws javax.faces.convert.ConverterException

Convert the Object representation of this component's value to the corresponding String representation. The default implementation utilizes the getAsString() method of any associated Converter.