com.raritantechnologies.utils.tree.taglibrary
Class CheckboxTreeNodeRenderer

java.lang.Object
  extended bycom.raritantechnologies.utils.tree.taglibrary.CheckboxTreeNodeRenderer
All Implemented Interfaces:
IConfigurable, ITreeNodeRenderer

public class CheckboxTreeNodeRenderer
extends java.lang.Object
implements ITreeNodeRenderer

Renders a checkbox to select tree nodes. Maintains selection state of a tree with selected state node attributes.

XML Configuration Template:
   <NodeRenderer class="com.raritantechnologies.utils.tree.taglibrary.CheckboxTreeNodeRenderer" 
                    name="[ name of checkbox ]"
                    selectParameter="[ request parameter containing node selection(s) ]"
                    unselectParameter="[ request parameter containing node deselection(s) ]"
                    selectAttribute="[ attribute in tree node that has selection state ]"
                    nodeIDAttribute="[ optional attribute in tree node that has node ID ]" >

   </NodeRenderer>

 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Constructor Summary
CheckboxTreeNodeRenderer()
           
 
Method Summary
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 java.lang.String renderNode(TreeNode treeNode, RaritanPageContext rpc)
          Determine from the rpc if a selection or unselection event has occurred.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckboxTreeNodeRenderer

public CheckboxTreeNodeRenderer()
Method Detail

renderNode

public java.lang.String renderNode(TreeNode treeNode,
                                   RaritanPageContext rpc)
Determine from the rpc if a selection or unselection event has occurred. Check if the node is visible, etc. Update selected state - (based on tree root name) in session cache...

Specified by:
renderNode in interface ITreeNodeRenderer

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable