WebFXLoadTree

This class extends WebFXTree and therefore all methods and field available for WebFXTree are also available for WebFXLoadTree.

This tree can be used to dynamically load an XML file that describes the tree.

Syntax

new WebFXLoadTree(sText, sXmlSrc, oAction, sBehavior, sIcon, sOpenIcon)

Parameters

NameTypeDescripton
sText The text (HTML) to show as a label for the tree item
sXmlSrc The URI to XML file describing the items in this tree node
oAction The action to do when the node is activated. If this is String then it is treated as an URL but you can also pass a Function object which will be called when activated.
sBehavior This is used to decide when to show the open icon for folders. Supported values are "classic" and "explorer". When this is "explorer" selected folders show the open icon. For "classic" the open icon is shown for expanded folders.
sIconThe image to use as icon
sOpenIconThe image to use as open icon

Static Methods

NameDescription
createItemFromElement

Syntax

object.createItemFromElement(oNode)

Arguments

NameTypeDescripton
oNode The XML element that describes the tree node.

Return Type

void

This static method takes an XML element and returns a WebFXAbstractNode
loadXmlDocument

Syntax

object.loadXmlDocument(jsNode)

Arguments

NameTypeDescripton
jsNode The load tree node that we want to load the document for.

Return Type

void

This starts loading of an XML document associated with a tree node.
documentLoaded

Syntax

object.documentLoaded(jsNode)

Arguments

NameTypeDescripton
jsNode The load tree node that we loaded the document for.

Return Type

void

This is called once the document for a tree node has loaded

Static Fields

NameTypeDescripton
None.

Methods

NameDescription
getSrc

Syntax

object.getSrc()

Arguments

No Arguments.

Return Type

void

Returns the URI to the XML file
reload

Syntax

object.reload()

Arguments

NameTypeDescripton

Return Type

void

Reloads the XML file and rebuilds the tree. If the XML file is cached (and the HTTP headers don't require the file to be refetched) the file will be taken from the cache.
setSrc

Syntax

object.setSrc()

Arguments

NameTypeDescripton

Return Type

void

Sets the URI to the XML file

Fields

NameTypeDescripton
None.

Events

NameDescripton
None.

Remarks

None.

WebFXLoadTreeItem

This class extends WebFXTreeItem and therefore all methods and field available for WebFXTreeItem are also available for WebFXLoadTreeItem.

This tree item can be used to dynamically load an XML file that describes the sub tree of the item.

Syntax

new WebFXLoadTreeItem(sText, sXmlSrc, oAction, eParent, sIcon, sOpenIcon)

Parameters

NameTypeDescripton
sText The text (HTML) to show as a label for the tree item
sXmlSrc The URI to XML file describing the items in this tree node
oAction The action to do when the node is activated. If this is String then it is treated as an URL but you can also pass a Function object which will be called when activated.
eParent Optional parent tree item. If provided then the item will be added as a child to eParent
sIconThe image to use as icon
sOpenIconThe image to use as open icon

Static Methods

NameDescription
None.

Static Fields

NameTypeDescripton
None.

Methods

NameDescription
getSrc

Syntax

object.getSrc()

Arguments

No Arguments.

Return Type

void

Returns the URI to the XML file
reload

Syntax

object.reload()

Arguments

NameTypeDescripton

Return Type

void

Reloads the XML file and rebuilds the tree. If the XML file is cached (and the HTTP headers don't require the file to be refetched) the file will be taken from the cache.
setSrc

Syntax

object.setSrc()

Arguments

NameTypeDescripton

Return Type

void

Sets the URI to the XML file

Fields

NameTypeDescripton
None.

Events

NameDescripton
None.

Remarks

None.