org.apache.myfaces.trinidad.render
Class RenderUtils

java.lang.Object
  extended by org.apache.myfaces.trinidad.render.RenderUtils

public class RenderUtils
extends java.lang.Object

Generic utilities for rendering.


Method Summary
static void encodeRecursive(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Encodes a component and all of its children.
static java.lang.String getFormId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Retrieves id of the form the component is contained in.
static java.lang.String getRelativeId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent from, java.lang.String relativeId)
          Returns a relative ID for use at rendering time, e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encodeRecursive

public static void encodeRecursive(javax.faces.context.FacesContext context,
                                   javax.faces.component.UIComponent component)
                            throws java.io.IOException
Encodes a component and all of its children.

Throws:
java.io.IOException

getFormId

public static java.lang.String getFormId(javax.faces.context.FacesContext context,
                                         javax.faces.component.UIComponent component)
Retrieves id of the form the component is contained in.

Parameters:
context - the faces context object
component - UIComponent whose container form id is to be retuirned
Returns:
String id of the form if one exists in component's hierarchy, otherwise null

getRelativeId

public static java.lang.String getRelativeId(javax.faces.context.FacesContext context,
                                             javax.faces.component.UIComponent from,
                                             java.lang.String relativeId)
Returns a relative ID for use at rendering time, e.g. "for" attributes on components. It does not assume that the target component can be located. A relative ID starting with NamingContainer.SEPARATOR_CHAR (that is, ':') will be treated as absolute (after dropping that character).



Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.