treeview


Name space rialto.widget
FILE rialtoEngine\javascript\components\controls\treeview.js
NAME treeview
INHERITS AbstractComponent
VERSION 0.86
update
DESCRIPTION This object create a create treeview



CONSTRUCTOR


Name Type Description Default
name String Name of the HTML element
top int Top position (in pixel) 0
left int Left position (in pixel) 0
width String Width (in pixel or %) 100%
height String Height (in pixel or %) 100%
parent String or reference Reference of an HTML or a javascript element parent of the frame html element
boolSelActive boolean Node style change when selected true
rootOpen boolean true if root node is open when created true
withRoot boolean true if there is a root node with title and image true
withT boolean true if you want a dashed line between the nodes true
draggableNode boolean true if the nodes of the tree could be draggable false

Example:
var treeT = new rialto.widget.Tree({name:'treeReload',
        							   top:'5',
        							   left:'0',
        							   width:'',
        							   height:'200',
        							   parent:CADRE5,        							   
        							   boolSelActive:true,
        							   rootOpen:true,
        							   withRoot:true,
        							   withT:true,draggableNode:false});
    	

PUBLIC METHODS


Method Arguments list Return value Inherits To redefine
addNode Object treeNode node,String nodeId void no no
createAndAddNode String nodeId,object objPar void no no
getRoot Object treeNode no no
onclick Object treeNode node no yes

addNode

add a node to the treeview
Parameters:
Object treeNode node:node to add
String nodeId:id of the node in which we want to add the new node.(rootnode if no indication)

createAndAddNode

this method will allow create and add a node to the treeview
Parameters:
String nodeId:id of the node in which we want to add the new node
object objPar:object use for the treeNode constructor

getRoot

this function return the root node of the treevew
Parameters:

onclick

this method will be raise after clicking on a node.
Parameters:
Object treeNode node:node clicked

The code must be redefine after the instanciation of the component. By default this method does nothing.