|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.render.Renderer
com.mycompany.jsf.renderer.TreeRenderer
This class is a JSF Renderer for the "com.mycompany.Tree" component type. It renders a tree structure for the nodes represented by the component's model using the "openNode", "closedNode" and "leafNode" facets.
Constructor Summary | |
TreeRenderer()
|
Method Summary | |
void |
encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Calls encodeNodes() to write the HTML elements for all nodes, within a "span" element with an "id" attribute set to the component's client ID if explicitly set. |
private void |
encodeNodes(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter out,
UITree tree,
java.lang.String parentId,
int childLevel)
Iterates over all expanded nodes in the model and processes the appropriate facet for each node. |
private void |
encodeRecursive(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Calls the appropriate encoding methods on the component and calls itself recursively for all component children. |
boolean |
getRendersChildren()
Returns "true". |
Methods inherited from class javax.faces.render.Renderer |
convertClientId, decode, encodeBegin, encodeEnd, getConvertedValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TreeRenderer()
Method Detail |
public boolean getRendersChildren()
public void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
private void encodeNodes(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, UITree tree, java.lang.String parentId, int childLevel) throws java.io.IOException
java.io.IOException
private void encodeRecursive(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |