:: Documentation >>

AW.UI.Tree

Tree control.

Constructor

 var obj = new AW.UI.Tree; 

Hierarchy

Models

controlControl data.
control formatFormatting object.
control imageImage name.
control linkHyperlink URL.
control stateControl's state.
control textDisplayed text.
control tooltipTooltip text.
control valueControl's value.
control visibleControl's visibility.
currentCurrent item (focus).
current itemCurrent item (focus).
itemList item data.
item countNumber of items.
item formatFormatting object.
item imageImage name.
item linkHyperlink URL.
item selectedSelection flag (true/false).
item stateItem state.
item textDisplayed text.
item tooltipTooltip text.
item valueItem value.
selectedSelected items.
selected itemsSelected items (array of indices).
selectionSelection mode.
selection modeSelection mode (single/multi).
tabTab index.
tab indexTab index.
viewList view data.
view countLength of the view range.
view expandedExpanded/collapsed flag.
view indicesArray of the list item indices.
view offsetOffset (number of positions) of the view range.
view positionItem position.

Templates

contentMain content area.
groupGroup template.
itemList item.
layoutControl layout.
scrollScroll/overflow template.

Methods

calculateItemStateReturns item state.
clearClears all models.
clearControlModelClears control model
clearCurrentModelClears current model
clearItemModelClears item model
clearSelectedModelClears selected model
clearSelectionModelClears selection model
clearStateModelClears state model
clearTabModelClears tab model
clearViewModelClears view model
cloneCreates an object clone.
defineControlPropertyCreates new control property
defineCurrentPropertyCreates new current property
defineItemPropertyCreates new item property
defineModelCreates get/set methods for the model.
defineSelectedPropertyCreates new selected property
defineSelectionPropertyCreates new selection property
defineStatePropertyCreates new state property
defineTabPropertyCreates new tab property
defineTemplateCreates get/set methods for the template.
defineViewPropertyCreates new view property
elementReturns the reference to the HTML element.
getAttributeReturns the value of the attribute.
getClassReturns the value of the CSS class.
getContentReturns the named HTML fragment.
getContentTemplateReturns content template
getControlFormatReturns control format
getControlImageReturns control image
getControlLinkReturns control link
getControlModelReturns control model
getControlPropertyReturns control property
getControlStateReturns control state
getControlTextReturns control text
getControlTooltipReturns control tooltip
getControlValueReturns control value
getControlVisibleReturns control visible
getCurrentItemReturns current item
getCurrentModelReturns current model
getCurrentPropertyReturns current property
getEventReturns the HTML event handler.
getGroupTemplateReturns group template
getIdReturns the unique ID of this object.
getItemCountReturns item count
getItemFormatReturns item format
getItemImageReturns item image
getItemLinkReturns item link
getItemModelReturns item model
getItemPropertyReturns item property
getItemSelectedReturns item selected
getItemStateReturns item state
getItemTemplateReturns item template
getItemTextReturns item text
getItemTooltipReturns item tooltip
getItemValueReturns item value
getLayoutTemplateReturns layout template
getModelReturns the external model.
getScrollTemplateReturns scroll template
getSelectedItemsReturns selected items
getSelectedModelReturns selected model
getSelectedPropertyReturns selected property
getSelectionModeReturns selection mode
getSelectionModelReturns selection model
getSelectionPropertyReturns selection property
getStateModelReturns state model
getStatePropertyReturns state property
getStyleReturns the value of the CSS style attribute.
getTabIndexReturns tab index
getTabModelReturns tab model
getTabPropertyReturns tab property
getTagReturns the HTML tag name.
getTemplateReturns the template.
getViewCountReturns view count
getViewExpandedReturns view expanded
getViewIndicesReturns view indices
getViewModelReturns view model
getViewOffsetReturns view offset
getViewPositionReturns view position
getViewPropertyReturns view property
initInitializes the object.
mapModelRedirects property requests.
mapTemplateRedirects template requests.
raiseEventRaises AW control event.
refreshUpdates the HTML element.
refreshClassesUpdates the className attribute of the HTML element.
setAttributeSets the value of the attribute.
setClassSets the value of the CSS class.
setContentAdds the static HTML fragment to the object.
setContentTemplateSets content template
setControlFormatSets control format
setControlImageSets control image
setControlLinkSets control link
setControlModelSets control model
setControlPropertySets control property
setControlStateSets control state
setControlTextSets control text
setControlTooltipSets control tooltip
setControlValueSets control value
setControlVisibleSets control visible
setControllerAssigns the controller.
setCurrentItemSets current item
setCurrentModelSets current model
setCurrentPropertySets current property
setEventAssigns the HTML event handler.
setGroupTemplateSets group template
setIdSets the unique ID for this object.
setItemCountSets item count
setItemFormatSets item format
setItemImageSets item image
setItemLinkSets item link
setItemModelSets item model
setItemPropertySets item property
setItemSelectedSets item selected
setItemStateSets item state
setItemTemplateSets item template
setItemTextSets item text
setItemTooltipSets item tooltip
setItemValueSets item value
setLayoutTemplateSets layout template
setModelAssigns the external model.
setPositionSets element position (absolute).
setScrollTemplateSets scroll template
setSelectedItemsSets selected items
setSelectedModelSets selected model
setSelectedPropertySets selected property
setSelectionModeSets selection mode
setSelectionModelSets selection model
setSelectionPropertySets selection property
setSizeSets element size.
setStateModelSets state model
setStatePropertySets state property
setStyleSets the value of the CSS style attribute.
setTabIndexSets tab index
setTabModelSets tab model
setTabPropertySets tab property
setTagSets the HTML tag name.
setTemplateAssigns the template.
setTimeoutCalls the function after the specified delay.
setViewCountSets view count
setViewExpandedSets view expanded
setViewIndicesSets view indices
setViewModelSets view model
setViewOffsetSets view offset
setViewPositionSets view position
setViewPropertySets view property
toStringConverts object to string.

Events

property change events - property changing/changed
template change events - template changed
control activation events - control activated/deactivated (focus/blur)
control keyboard events - keypress and special keys
control mouse events - control mouseover, mousedown, click etc.
item mouse events - item mouseover, mousedown, click etc.

Example

var tree = {
    0: [1, 2, 3, 4],
    1: [5, 6],
    2: [7],
    3: [8],
    4: [9]
}

var obj = new AW.UI.Tree;
obj.setItemText(["", "Home", "Favorites", "Font size", "Search", "Child node 1", "Child node 2"]);
obj.setItemImage(["", "home", "favorites", "fontsize", "search"]);
obj.setViewCount(function(i){return tree[i] ? tree[i].length : 0});
obj.setViewIndices(function(i){return tree[i]});
document.write(obj);

See also

Tree control overview

Comments

tree node click madhura (1)
Problem with selectedItem in Tree Caplain G. (1)
Expand a node programatically? Kevin (1)
Lack of proper description in ActiveWidgets documentation Dool (0)
Can right-click context menu events be different for each tree item? js (1)
Turn off the box on side of leaf nodes Rob Keefer (1)
How to create dynamic tree VadivelMurugan.G (1)
Any sample tree with url Sergio Ramon Mac (0)
folder-open.gif/folder-close.gif ? Valeri (0)
get item text of tree control BazookaJoeZone (6)
Multi-selection in trees Daniel (2)
Dynamically populate tree Daniel (1)
Fix for duplicate tree nodes bug in FF 1.0.x Alex (ActiveWidgets) (1)
Programmatically showing a selected tree node icodeon (4)
Tree Control - Does not intent when the depth reaches 6 or more Dan B. (3)
store the expanded tree Dragos (0)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5