com.sun.rave.web.ui.renderer
Class FieldRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by com.sun.rave.web.ui.renderer.FieldRenderer
Direct Known Subclasses:
CalendarRenderer, PasswordFieldRenderer, TextAreaRenderer, TextFieldRenderer, UploadRenderer

public class FieldRenderer
extends javax.faces.render.Renderer

Renderer for TextField components.


Field Summary
static java.lang.String SPACER_ID
           
static java.lang.String[] STRING_ATTRIBUTES
          The list of attribute names in the HTML 4.01 Specification that correspond to the entity type %events;.
 
Constructor Summary
FieldRenderer()
           
 
Method Summary
 void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Decode the component component
 void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          No-op
 void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          No-op.
 void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
 boolean getRendersChildren()
          Returns true, meaning that the FieldRenderer is responsible for rendering the children the component it is asked to render.
protected  java.lang.String getStyleClass(Field component, java.lang.String hiddenStyle)
           
 boolean renderField(javax.faces.context.FacesContext context, Field component, java.lang.String type, java.lang.String[] styles)
          Render the TextField depending on the value of the type property.
protected  void renderInput(Field component, java.lang.String type, java.lang.String id, boolean renderUserStyles, java.lang.String[] styles, javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter writer)
           
 
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
 

Field Detail

STRING_ATTRIBUTES

public static final java.lang.String[] STRING_ATTRIBUTES

The list of attribute names in the HTML 4.01 Specification that correspond to the entity type %events;.


SPACER_ID

public static final java.lang.String SPACER_ID
See Also:
Constant Field Values
Constructor Detail

FieldRenderer

public FieldRenderer()
Method Detail

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context,
                      javax.faces.component.UIComponent component)
               throws java.io.IOException
Overrides:
encodeEnd in class javax.faces.render.Renderer
Throws:
java.io.IOException

renderField

public boolean renderField(javax.faces.context.FacesContext context,
                           Field component,
                           java.lang.String type,
                           java.lang.String[] styles)
                    throws java.io.IOException

Render the TextField depending on the value of the type property.

Parameters:
context - FacesContext for the current request
component - UIComponent to be rendered
Throws:
java.io.IOException - if an input/output error occurs

renderInput

protected void renderInput(Field component,
                           java.lang.String type,
                           java.lang.String id,
                           boolean renderUserStyles,
                           java.lang.String[] styles,
                           javax.faces.context.FacesContext context,
                           javax.faces.context.ResponseWriter writer)
                    throws java.io.IOException
Throws:
java.io.IOException

getStyleClass

protected java.lang.String getStyleClass(Field component,
                                         java.lang.String hiddenStyle)

decode

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

Overrides:
decode in class javax.faces.render.Renderer
Parameters:
context - The FacesContext associated with this request
component - The TextField component to decode

encodeChildren

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

No-op.

Overrides:
encodeChildren in class javax.faces.render.Renderer
Parameters:
context - FacesContext for the response we are creating
component - UIComponent whose children are to be rendered
Throws:
java.io.IOException - if an input/output error occurs while rendering
java.lang.NullPointerException - if context or component is null

encodeBegin

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

No-op

Overrides:
encodeBegin in class javax.faces.render.Renderer
Parameters:
context - FacesContext for the request we are processing
component - UIComponent to be rendered

getRendersChildren

public boolean getRendersChildren()

Returns true, meaning that the FieldRenderer is responsible for rendering the children the component it is asked to render.

Overrides:
getRendersChildren in class javax.faces.render.Renderer
Returns:
false;