Package com.microstrategy.web.app.gui
Interface TreeView
-
- All Superinterfaces:
GuiElement
- All Known Implementing Classes:
TreeViewImpl
public interface TreeView extends GuiElement
The TreeView GuiElement is designed to create a hierarchical tree that can be dynamically populated using WebEvents.
It renders an enumeration ofTreeNode
objects. Each TreeNode contains its display information as well as the event to trigger when the node is selected, or in the case when the node is not a leaf, the event that will retrieve its content.
Noticed that Events to expand a node will automatically be submitted through the iFrame using javascript.
All the TreeNode elements will be populated into the rootTreeNode which is the root node that any TreeView will always have.
The TreeView can be rendered using the renderElement:GuiElement.renderElement()
it creates and register a new tree and populates it nodes with the TreeNode Enumeration.
You can set any properties on the main div of the tree view. These could be any name-value pairs set by using thesetTreeDivAttribute(String, String)
method.
When using this GuiElement, make sure the links to the following files are included in the final HTML output:- javascript/DHTML.js
- javascript/treev3.js
- style/mstr/tree.css
- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TREE_COMPONENT_ID
ID used by the tree for the content that needs to be updated.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addScriptDependency(java.lang.String filename, java.lang.String loadCondition)
This method adds a script dependency for a bone.JsonGenerator
getJSONGenerator()
This allows the user to retrieve the JSONGenerator object on which attribute-value pairs can be set These attribute-value pairs translate to properties on the tree bone tree boneboolean
getRenderEntireTreeIframeReqNotWithstanding()
Returns a boolean value that indicates whether a criteria has been set other than iframe request which decides whether the entire tree should be rendered or just the request nodeTreeNode
getRootTreeNode()
Function used to return the root tree node.void
setRenderEntireTreeIframeReqNotWithstanding(boolean value)
This method allows the user to specify if he/she wants a criteria other than iframe request to decide whether to render the entire tree or render just the request node.void
setRenderRoot(boolean renderRoot)
void
setRenderShell(boolean renderShell)
void
setRootTreeNode(TreeNode root)
void
setScriptClass(java.lang.String scriptClass)
Holds the name of the javaScript class to be associated with the component.void
setStyle(java.lang.String style)
void
setSubObjectType(java.lang.String subObjType)
Holds the sub object type of the tree if the tree bone is used as a child bone A bone is the corresponding concept of a bean in Microstrategy's javascript environment.
by defautl the subObjectType of the tree is null so the tree bone itself should be a registered bonevoid
setTreeDivAttribute(java.lang.String name, java.lang.String value)
Function used for setting Tree properties.-
Methods inherited from interface com.microstrategy.web.app.gui.GuiElement
getAppContext, getDescriptor, getDescriptor, getEventManager, getExtraInput, getExtraUrl, getFeatures, getMessages, getName, getUseIFrame, getWebComponent, renderElement, renderElement, setAppContext, setExtraInput, setExtraUrl, setName, setUseIFrame, setWebComponent
-
-
-
-
Field Detail
-
TREE_COMPONENT_ID
static final java.lang.String TREE_COMPONENT_ID
ID used by the tree for the content that needs to be updated. Transforms generating content for a Tree iframe request need to use this as their own ID.
* Value:divTreeWait
- See Also:
- Constant Field Values
-
-
Method Detail
-
setRenderRoot
void setRenderRoot(boolean renderRoot)
-
setRootTreeNode
void setRootTreeNode(TreeNode root)
-
getRootTreeNode
TreeNode getRootTreeNode()
Function used to return the root tree node. The TreeBox will iterate though the children of this root node to render the tree.- Returns:
- The root TreeNode
-
setTreeDivAttribute
void setTreeDivAttribute(java.lang.String name, java.lang.String value)
Function used for setting Tree properties. You can specify any property to be set on the main tree div using this function.- Parameters:
name
- Name of propertyvalue
- Property's value.
-
setScriptClass
void setScriptClass(java.lang.String scriptClass)
Holds the name of the javaScript class to be associated with the component. When the scriptClass is specified, a bone is registered on the page for this component. A bone is the corresponding concept of a bean in Microstrategy's javascript environment.
If no scriptClass is specified we will use "mstrTreeViewImpl" as the default scriptClass- Parameters:
scriptClass
- the name of the script class
-
setSubObjectType
void setSubObjectType(java.lang.String subObjType)
Holds the sub object type of the tree if the tree bone is used as a child bone A bone is the corresponding concept of a bean in Microstrategy's javascript environment.
by defautl the subObjectType of the tree is null so the tree bone itself should be a registered bone- Parameters:
subObjType
- the sub object type to be set
-
addScriptDependency
void addScriptDependency(java.lang.String filename, java.lang.String loadCondition)
This method adds a script dependency for a bone. Registration of a bone with a script dependency will be held until all script file dependencies have been resolved (loaded). If the user does not specify any script dependency the application will use "mstrTreeViewImpl.js" as the default JavaScript file name and "mstrTreeViewImplScript" the as the default load condition.- Parameters:
filename
- String the name of the script fileloadCondition
- String a JavaScript string that when evaluated (using the eval function) will return true when the file is loaded.
-
setRenderEntireTreeIframeReqNotWithstanding
void setRenderEntireTreeIframeReqNotWithstanding(boolean value)
This method allows the user to specify if he/she wants a criteria other than iframe request to decide whether to render the entire tree or render just the request node. If set to true, the entire tree will be rendered irrespective of whether the request was an iframe request or not. Default value is set to false- Parameters:
value
-
-
getRenderEntireTreeIframeReqNotWithstanding
boolean getRenderEntireTreeIframeReqNotWithstanding()
Returns a boolean value that indicates whether a criteria has been set other than iframe request which decides whether the entire tree should be rendered or just the request node
-
setRenderShell
void setRenderShell(boolean renderShell)
-
getJSONGenerator
JsonGenerator getJSONGenerator()
This allows the user to retrieve the JSONGenerator object on which attribute-value pairs can be set These attribute-value pairs translate to properties on the tree bone tree bone
-
setStyle
void setStyle(java.lang.String style)
-
-