org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table
Class TreeUtils

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TreeUtils

public final class TreeUtils
extends java.lang.Object

Class that handles all tree related events

Author:
The Oracle ADF Faces Team

Field Summary
static java.lang.String EVENT_PARAM
           
static java.lang.String SOURCE_PARAM
           
 
Method Summary
static java.lang.String callJSExpandAll(org.apache.myfaces.trinidad.component.UIXHierarchy tree, java.lang.String jsVarName, boolean isExpand)
           
static java.lang.String callJSExpandNode(org.apache.myfaces.trinidad.component.UIXHierarchy tree, java.lang.String jsVarName, boolean isExpand)
           
static java.lang.String callJSFocusNode(org.apache.myfaces.trinidad.component.UIXHierarchy tree, java.lang.String jsVarName)
           
static java.lang.String callJSGotoNode(org.apache.myfaces.trinidad.component.UIXHierarchy tree, java.lang.String jsVarName, int rangeStart)
           
static java.lang.String callJSSelectAll(java.lang.String jsVarName, boolean isSelectAll)
           
static java.lang.String createNewJSCollectionComponentState(java.lang.String formName, java.lang.String treeClientId)
           
static void decodeExpandEvents(java.util.Map<java.lang.String,java.lang.String> parameters, javax.faces.component.UIComponent tree, java.lang.Object focusRowKey)
           
static void decodeFocusEvent(java.util.Map<java.lang.String,java.lang.String> parameters, javax.faces.component.UIComponent tree)
           
static void decodeGotoEvent(java.util.Map<java.lang.String,java.lang.String> parameters, javax.faces.component.UIComponent tree)
           
static void expandFocusRowKey(org.apache.myfaces.trinidad.component.UIXTree tree)
          Utility method to expand the focusRowKey during intial rendering.
static java.lang.Object getFocusRowKey(org.apache.myfaces.trinidad.component.UIXTreeTable treeTable)
           
static void setDefaultFocusRowKey(org.apache.myfaces.trinidad.component.UIXTree tree)
          Utility method to default the focusRowKey to the root node, if it is not set
static java.lang.String setupJSMultiSelectCollectionComponent(java.lang.String selectedKey, java.lang.String selectedModeKey, boolean autoSubmit)
           
static java.lang.String setupJSTreeCollectionComponent(boolean validate)
           
static java.lang.StringBuffer setupTreeCollectionComponent(java.lang.StringBuffer buff, boolean validate)
          writes the JS function needed for generating tree events.
static void writeNodeLevel(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, int depth, java.lang.String nodeLevelTextKey)
          This method is used for writing the depth of node from it's root in the case tree and HGrid, thus making it more accessible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_PARAM

public static final java.lang.String EVENT_PARAM
See Also:
Constant Field Values

SOURCE_PARAM

public static final java.lang.String SOURCE_PARAM
See Also:
Constant Field Values
Method Detail

writeNodeLevel

public static void writeNodeLevel(javax.faces.context.FacesContext context,
                                  org.apache.myfaces.trinidad.context.RenderingContext arc,
                                  int depth,
                                  java.lang.String nodeLevelTextKey)
                           throws java.io.IOException
This method is used for writing the depth of node from it's root in the case tree and HGrid, thus making it more accessible.

Throws:
java.io.IOException

getFocusRowKey

public static java.lang.Object getFocusRowKey(org.apache.myfaces.trinidad.component.UIXTreeTable treeTable)

expandFocusRowKey

public static void expandFocusRowKey(org.apache.myfaces.trinidad.component.UIXTree tree)
Utility method to expand the focusRowKey during intial rendering.

Parameters:
tree -

setDefaultFocusRowKey

public static void setDefaultFocusRowKey(org.apache.myfaces.trinidad.component.UIXTree tree)
Utility method to default the focusRowKey to the root node, if it is not set

Parameters:
tree -

setupTreeCollectionComponent

public static java.lang.StringBuffer setupTreeCollectionComponent(java.lang.StringBuffer buff,
                                                                  boolean validate)
writes the JS function needed for generating tree events.

Parameters:
buff - the function source is appended to this buffer
Returns:

setupJSTreeCollectionComponent

public static java.lang.String setupJSTreeCollectionComponent(boolean validate)

setupJSMultiSelectCollectionComponent

public static java.lang.String setupJSMultiSelectCollectionComponent(java.lang.String selectedKey,
                                                                     java.lang.String selectedModeKey,
                                                                     boolean autoSubmit)

createNewJSCollectionComponentState

public static java.lang.String createNewJSCollectionComponentState(java.lang.String formName,
                                                                   java.lang.String treeClientId)

callJSExpandNode

public static java.lang.String callJSExpandNode(org.apache.myfaces.trinidad.component.UIXHierarchy tree,
                                                java.lang.String jsVarName,
                                                boolean isExpand)

callJSGotoNode

public static java.lang.String callJSGotoNode(org.apache.myfaces.trinidad.component.UIXHierarchy tree,
                                              java.lang.String jsVarName,
                                              int rangeStart)

callJSFocusNode

public static java.lang.String callJSFocusNode(org.apache.myfaces.trinidad.component.UIXHierarchy tree,
                                               java.lang.String jsVarName)

callJSExpandAll

public static java.lang.String callJSExpandAll(org.apache.myfaces.trinidad.component.UIXHierarchy tree,
                                               java.lang.String jsVarName,
                                               boolean isExpand)

callJSSelectAll

public static java.lang.String callJSSelectAll(java.lang.String jsVarName,
                                               boolean isSelectAll)

decodeGotoEvent

public static void decodeGotoEvent(java.util.Map<java.lang.String,java.lang.String> parameters,
                                   javax.faces.component.UIComponent tree)

decodeFocusEvent

public static void decodeFocusEvent(java.util.Map<java.lang.String,java.lang.String> parameters,
                                    javax.faces.component.UIComponent tree)

decodeExpandEvents

public static void decodeExpandEvents(java.util.Map<java.lang.String,java.lang.String> parameters,
                                      javax.faces.component.UIComponent tree,
                                      java.lang.Object focusRowKey)


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