Class BaseRenderer

java.lang.Object
javax.faces.render.Renderer
com.webmethods.caf.faces.render.BaseRenderer
Direct Known Subclasses:
com.webmethods.caf.faces.render.html.BaseHtmlRenderer

public class BaseRenderer extends Renderer
Base CAF JSF renderer implementation.
  • Constructor Details

    • BaseRenderer

      public BaseRenderer()
  • Method Details

    • encodeChildren

      public void encodeChildren(FacesContext context, UIComponent component) throws IOException
      Overrides:
      encodeChildren in class Renderer
      Throws:
      IOException
    • getConvertedValue

      public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue) throws ConverterException
      Overrides:
      getConvertedValue in class Renderer
      Throws:
      ConverterException
    • getValue

      protected Object getValue(FacesContext context, UIComponent component)
      Get component's value.
    • getStringValue

      protected String getStringValue(FacesContext context, UIComponent component, Object value) throws ConverterException
      Converts specified component value to a string. Nulls are converted to empty strings ("").
      Parameters:
      context - Current context.
      component - Component for which to conver the value.
      value - Value to convert.
      Returns:
      String representation of value.
      Throws:
      ConverterException
    • getConvertedStringArrayValue

      protected Object getConvertedStringArrayValue(FacesContext context, UIComponent component, String[] value) throws ConverterException
      Converts string-array to appropriately-typed array or collection, based on component's value-binding.
      Throws:
      ConverterException
    • writeAttributes

      protected void writeAttributes(FacesContext context, UIComponent component, String[] componentAttributes) throws IOException
      Writes the specified component property/attributes as attributes of the current element.
      Parameters:
      context - Current context.
      component - Current component.
      componentAttributes - Component attribute names.
      Throws:
      IOException
    • writeAttributes

      protected void writeAttributes(FacesContext context, UIComponent component, String[] componentAttributes, String[] elementAttributes) throws IOException
      Writes the specified component property/attributes as attributes of the current element.
      Parameters:
      context - Current context.
      component - Current component.
      componentAttributes - Component attribute names.
      elementAttributes - Element attribute names. If null, uses componentNames for element attribute names.
      Throws:
      IOException
    • writeBooleanAttributes

      protected void writeBooleanAttributes(FacesContext context, UIComponent component, String[] componentAttributes) throws IOException
      Writes the specified component property/attributes as boolean attributes of the current element (writes "elementAttribute='true'" if attribute is Boolean.TRUE or "true" or "TRUE"; writes nothing otherwise).
      Parameters:
      context - Current context.
      component - Current component.
      componentAttributes - Component attribute names.
      Throws:
      IOException
    • writeBooleanAttributes

      protected void writeBooleanAttributes(FacesContext context, UIComponent component, String[] componentAttributes, String[] elementAttributes) throws IOException
      Writes the specified component property/attributes as boolean attributes of the current element (writes "elementAttribute='true'" if attribute is Boolean.TRUE or "true" or "TRUE"; writes nothing otherwise).
      Parameters:
      context - Current context.
      component - Current component.
      componentAttributes - Component attribute names.
      elementAttributes - Element attribute names. If null, uses componentNames for element attribute names.
      Throws:
      IOException
    • findForm

      protected UIForm findForm(FacesContext context, UIComponent component)
      Find ancestor form of specified component.
      Parameters:
      context - Current context.
      component - Component from which to start searching.
      Returns:
      Form or null.
    • getParameters

      protected List<UIParameter> getParameters(FacesContext context, UIComponent component)
      Returns:
      List of UIParameter children of this component. Never null.
    • renderComponent

      protected void renderComponent(FacesContext ctx, UIComponent component) throws IOException, FacesException
      Render the specified sub-tree.
      Throws:
      IOException
      FacesException