DBTreeview
(part of package 'Servoy Extra Components') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent
This is a reference page; many components have detailed usage guides here.
Properties
allowDrag
Can be used to enable dragging of nodes. Can either be a boolean value or a clientfunction that is executed in browser. Default value is false.
Type: object
allowDrop
Can be used to enable dropping of nodes. Can either be a boolean value or a clientfunction that is executed in browser. Default value is false.
Type: object
autoRefresh
If true, component listens to foundset changes and updates itself while visible.
Type: boolean Default Value: true
enabled
Type: boolean Default Value: true
responsiveHeight
Height of the treeview, set only in responsive forms.
Type: int Default Value: 0
showLoadingIndicator
Type: boolean Default Value: true
styleClass
Type: styleclass
visible
Type: boolean Default Value: true
Events
onDrop
Called when a node is dropped as a result of a drag-n-drop
Parameters:
sourceNodePkPath string[] targetNodePkPath string[] indexInParent int event JSEvent
onReady
Parameters:
event JSEvent
API
addRoots
Add foundset to the list of foundsets used to create the tree's root nodes.
@example
@param foundSet
Parameters:
root foundsetref
createRelationInfo
Create relation info object used to set multiple child relations for a tree node
@param label @param nRelationName @return {relationInfo}
Parameters:
Returns: relationInfo
getCheckBoxValues
Parameters:
datasource string
Returns: string[]
getSelectionPath
Returns path of the selected node.
@example
@return {Array}
Returns: object[]
isNodeExpanded
Returns expand state of a node.
@example
@param pkarray array of each level id @return {boolean}
Parameters:
pk object[]
Returns: boolean
refresh
Refresh the tree display.
@example
removeAllRoots
Clears all foundset roots of the tree.
@example
setActionsCallBack
Set callback info for specific actions.
@example
@param actions
Parameters:
actions action[]
setCallBackInfo
Set callback info for a datasource foundset display.
@example
@param datasource @param callbackfunction callback function name @param param
Parameters:
setCheckBoxAutoselectsChildren
Set the nodes whose checkbox will automatically autoselect children.
@example
@param datasource @param autoselect
Parameters:
setCheckBoxValueDataprovider
Set dataprovider for the checkbox displayed for a datasource foundset.
@example
@param datasource @param checkboxvaluedataprovider dataprovider of the displayed checkbox
Parameters:
setChildSortDataprovider
Set the dataprovider name to retrieve column name and sort order for the child nodes. The provided data must be a string of form : column_name_used_for_sort sort_order(asc or desc)
@example
@param datasource @param childsortdataprovider dataprovider of the sort text
Parameters:
setExpandNode
Sets expand state of a node.
@example
@param pkarray array of each level id @param state expand state
Parameters:
setHasCheckBoxDataprovider
Set relation for displaying a datasource foundset.
@example
@param datasource @param nrelationname relation name
Parameters:
setHasCheckBoxValue
Set the nodes that should have checkbox for a datasource when no hascheckboxdataprovider is used
@example
@param datasource @param hasCheckboxValue array of pks that should have checkbox
Parameters:
setImageURLDataprovider
Set dataprovider for the image displayed in tree node for a datasource foundset.
@example
@param datasource @param imageurldataprovider dataprovider of the node image
Parameters:
setInitialCheckBoxValues
Set intial checked checkboxes for a datasource foundset when no checkboxdataprovider is used
@example
@param datasource @param checkboxValues array of pks that should have the checkbox checked
Parameters:
setMethodToCallOnCheckBoxChange
Set callback info for a datasource foundset checkbox display.
@example
@param datasource @param callbackfunction callback function name @param param
Parameters:
setMethodToCallOnDoubleClick
Set callback info for a datasource foundset doubleclick event.
@example
@param datasource @param callbackfunction callback function name @param param
Parameters:
setMethodToCallOnRightClick
Set callback info for a datasource foundset right click event.
@example
@param datasource @param callbackfunction callback function name @param param
Parameters:
setNRelationInfos
Set n-relation infos (array of RelationInfo objects created using tree.createRelationInfo() for having multiple child relations for one node)
@param datasource @param relationInfos
Parameters:
datasource string relationInfos relationInfo[]
setNRelationName
Set relation for displaying a datasource foundset.
@example
@param datasource @param nrelationname relation name
Parameters:
setNodeLevelVisible
Sets expanded state for a tree level. Expanding the tree may cause performance issues.
@example
@param level level in tree @param state expanded state
Parameters:
setSelectionPath
Sets selection node of the tree.
@example
@param pkarray array of each level id
Parameters:
pk object[]
setTextDataprovider
Set dataprovider for the text displayed from a datasource foundset.
@example
@param datasource @param textdataprovider dataprovider of the displayed text
Parameters:
setToolTipTextDataprovider
Set dataprovider for the tooltip text displayed for a datasource foundset.
@example
@param datasource @param tooltiptextdataprovider dataprovider of the displayed checkbox
Parameters:
updateCheckBoxValues
Parameters:
Types
action
scripting type: CustomType<servoyextra-dbtreeview.action>
binding
scripting type: CustomType<servoyextra-dbtreeview.binding>
callbackinfo
Type: callback
checkboxvaluedataprovider
Type: string
childsortdataprovider
Type: string
datasource
Type: string
hasCheckboxValue
Type: object[]
hascheckboxdataprovider
Type: string
imageurldataprovider
Type: string
initialCheckboxValues
Type: object[]
methodToCallOnCheckBoxChange
Type: callback
methodToCallOnDoubleClick
Type: callback
methodToCallOnRightClick
Type: callback
nRelationInfos
Type: relationInfo[]
nrelationname
Type: string
textdataprovider
Type: string
tooltiptextdataprovider
Type: string
callback
scripting type: CustomType<servoyextra-dbtreeview.callback>
levelVisibilityType
scripting type: CustomType<servoyextra-dbtreeview.levelVisibilityType>
relationInfo
scripting type: CustomType<servoyextra-dbtreeview.relationInfo>
Last updated