public class

PromptHierarchicalTreeXHTMLTransform

extends PromptHierarchicalCartXHTMLTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.transform.AbstractLayoutTransform
       ↳ com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
         ↳ com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
           ↳ com.microstrategy.web.app.transforms.PromptCartXHTMLTransform
             ↳ com.microstrategy.web.app.transforms.PromptExpressionCartXHTMLTransform
               ↳ com.microstrategy.web.app.transforms.PromptHierarchicalCartXHTMLTransform
                 ↳ com.microstrategy.web.app.transforms.PromptHierarchicalTreeXHTMLTransform

Class Overview

Renders hierarchical prompt in "tree" style, with the attribute populated dynamically using javascript, as the user expands in nodes.
The output of this Transform generates well-formed XHTML, supports layout-xml, and it's designed to use external css files for all formatting.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.PromptHierarchicalCartXHTMLTransform
From interface com.microstrategy.web.beans.EnumPromptsBeanEvents
Fields
protected String _attributeImage
protected String _attributeLockedImage
protected String _elementImage
protected String _folderImage
protected String _hierarchyImage
protected Vector _treeList
public FormalParameter attributeImage Image used to represent an attribute.
public FormalParameter attributeLockedImage Image used to represent a locked attribute.
public FormalParameter elementImage Image used to represent an attribute element.
public FormalParameter folderImage Image used to represent a folder.
public FormalParameter folderItemsInTree Specifies whether folder items should be displayed or not.
public FormalParameter hierarchiesInTree Specifies whether the hierarchies will be displayed inside the tree.
public FormalParameter hierarchyImage Image used to represent a hierarchy.
public FormalParameter searchSize Specifies the size of the search text box.
public FormalParameter treeStyle Class to indicate the style to use when displaying the tree.
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.PromptHierarchicalCartXHTMLTransform
From class com.microstrategy.web.app.transforms.PromptExpressionCartXHTMLTransform
From class com.microstrategy.web.app.transforms.PromptCartXHTMLTransform
From class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
From class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
Public Constructors
PromptHierarchicalTreeXHTMLTransform()
Default no-args constructor, initialize all the formal parameters.
Public Methods
String getResourcesFolder(String folderType)
Maps the AppContext's getResourceFolder method.
void initializeCart()
Initializes this transform's CartExpression instance properties to default values.
void initializeCss()
Initializes CSS information to be used by this transform.
void initializeImages()
Function that initializes the images used in the transform.
boolean isAttributeInformationVisible()
Indicates if the attribute information will remain visible for this cart's display, depending if trees are supported or not.
boolean isButtonTabControlVisible()
Indicates if the tab control buttons (for allowing users to switch from Select to Qualify) will be visible for this cart's display.
boolean isHierarchyInformationVisible()
Indicates if the hiearchy information will remain visible for this cart's display.
boolean isSearchVisible()
Indicates if the search information and options will remain visible for this cart's display.
boolean isTreeSupported()
Utility method that determines if trees are supported or not for the prompt display.
void renderAdd(MarkupOutput out)
Renders the add button information for the cart.
void renderAvailable(MarkupOutput out)
Renders the list of available objects on the cart.
void renderCart(MarkupOutput out)
Renders a hierarchical shopping cart output by calling different methods that will render the individual sections of the prompt layout.
void renderHierarchyInformation(MarkupOutput out)
Renders the hierarchy information of the prompt cart being displayed.
void renderParentCart(MarkupOutput out)
Wraps parent renderCart method.
void renderParentContent(MarkupOutput out)
Wraps parent renderCart method.
void renderPromptContent(MarkupOutput out)
Renders the prompt question layout content.
void renderRemove(MarkupOutput out)
Renders the remove button information for the cart.
void renderTreeJavaScript(MarkupOutput out)
Renders the JavaScript required for the tree control to behave correctly on user's browser.
void renderTreeStyle(MarkupOutput out)
Renders HTML for adding the stylesheet required for the prompt display to show correctly on the client's browser.
Protected Methods
TreeNode addTreeNodeToList(WebDisplayUnit item, int level)
Adds WebDisplayUnit item to tree prompt.
void cleanHierarchyList()
Clears anything other than hierarchies from the list, for example, folders.
TreeCartExpression createTreeCartExpression()
Create a new CartExpression using the GUIElement Factory
CartExpression getCartExpression()
Returns an active CartExpression instance.
WebEvent getPromptEvent(int eventId)
Obtains an instance of WebEvent according to the event identifier indicated.
boolean isNodeComplex(WebNode node)
This method is deprecated. This method has been deprecated since this is specific to expression prompts.
Use the method on AbstractPromptExpressionTransform.
void processAvailableItems()
Initializes the available units list.
void processHierarchicalSubFolders()
Parses hierarchy sub folder list and initialize collection for its rendering.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.PromptHierarchicalCartXHTMLTransform
From class com.microstrategy.web.app.transforms.PromptExpressionCartXHTMLTransform
From class com.microstrategy.web.app.transforms.PromptCartXHTMLTransform
From class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
From class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
From class com.microstrategy.web.transform.AbstractLayoutTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.transform.LayoutTransform
From interface com.microstrategy.web.transform.Transform

Fields

protected String _attributeImage

protected String _attributeLockedImage

protected String _elementImage

protected String _folderImage

protected String _hierarchyImage

protected Vector _treeList

public FormalParameter attributeImage

Image used to represent an attribute.

public FormalParameter attributeLockedImage

Image used to represent a locked attribute.

public FormalParameter elementImage

Image used to represent an attribute element.

public FormalParameter folderImage

Image used to represent a folder.

public FormalParameter folderItemsInTree

Specifies whether folder items should be displayed or not.

public FormalParameter hierarchiesInTree

Specifies whether the hierarchies will be displayed inside the tree.

public FormalParameter hierarchyImage

Image used to represent a hierarchy.

public FormalParameter searchSize

Specifies the size of the search text box.

public FormalParameter treeStyle

Class to indicate the style to use when displaying the tree.

Public Constructors

public PromptHierarchicalTreeXHTMLTransform ()

Default no-args constructor, initialize all the formal parameters.

Public Methods

public String getResourcesFolder (String folderType)

Maps the AppContext's getResourceFolder method.
It validates that the getBeanContext is indeed an AppContext instance.

Parameters
folderType the folder type to look for
Returns
  • AppContext's getResourceFolder result, or an empty string if it could not be obtained.

public void initializeCart ()

Initializes this transform's CartExpression instance properties to default values.

public void initializeCss ()

Initializes CSS information to be used by this transform.
It invokes parent method so shared CSS get initialized as well.

public void initializeImages ()

Function that initializes the images used in the transform.

public boolean isAttributeInformationVisible ()

Indicates if the attribute information will remain visible for this cart's display, depending if trees are supported or not.

Returns
  • boolean True if the attribute information should be included on the HTML output for the user.

public boolean isButtonTabControlVisible ()

Indicates if the tab control buttons (for allowing users to switch from Select to Qualify) will be visible for this cart's display.
It depends if trees are supported or not.

Returns
  • boolean True if the button tab control information should be included on the HTML output for the user.

public boolean isHierarchyInformationVisible ()

Indicates if the hiearchy information will remain visible for this cart's display.
It depends if there is information to render.

Returns
  • boolean True if the hierarchy information should be included on the HTML output for the user.

public boolean isSearchVisible ()

Indicates if the search information and options will remain visible for this cart's display.
This is depending if the property has been assigned to the CartExpression instance for this transform.

Returns
  • boolean True if the search information should be included on the HTML output for the user.

public boolean isTreeSupported ()

Utility method that determines if trees are supported or not for the prompt display.

Returns
  • True if the output mode is DHTML and the browser used is of version 6.0 or greater. Returns False otherwise.

public void renderAdd (MarkupOutput out)

Renders the add button information for the cart.
It overwrites the parent renderAdd method by initializing specific JavaScript code associated with the button.

Parameters
out MarkupOutput instance where the HTML content generated by this method will be saved

public void renderAvailable (MarkupOutput out)

Renders the list of available objects on the cart.

Parameters
out MarkupOutput instance where the output HTML will be stored.

public void renderCart (MarkupOutput out)

Renders a hierarchical shopping cart output by calling different methods that will render the individual sections of the prompt layout.
The output is organized with a series of DIV HTML tags created. It overwrites the parent's renderCart method by adding the renderTreeStyle(MarkupOutput) and renderTreeJavaScript method calls.
The methods used for the cart output are listed below, where out is a MarkupOutput instance where the HTML generated by these calls is saved.

Parameters
out MarkupOutput instance where the output HTML will be stored.

public void renderHierarchyInformation (MarkupOutput out)

Renders the hierarchy information of the prompt cart being displayed.
For tree style, this means to render pull-down menu consisted of hierarchies.

Parameters
out MarkupOutput instance where the output HTML will be stored.

public void renderParentCart (MarkupOutput out)

Wraps parent renderCart method.
It only renders cart layout as defined in non-tree Hierarchical prompt. Function useful in Layouts infrastructure where parent behavior or layout can be displayed.

Parameters
out MarkupOutput where to write Prompt output.

public void renderParentContent (MarkupOutput out)

Wraps parent renderCart method.
Similar to renderParentCart method but FP hierarchiesInTree gets reset to False, indicating that the entire Tree prompt transform will adopt parent's layout to look and act as a non-tree hierarchical prompt.
Function useful in Layouts infrastructure where parent behavior or layout can be displayed.

Parameters
out MarkupOutput where Parent prompt will write its ouput.

public void renderPromptContent (MarkupOutput out)

Renders the prompt question layout content.
It calls renderCart(MarkupOutput) method. If trees are not supported, then it will call the parent's renderPromptContent method.

Parameters
out MarkupOutput instance where the output HTML will be stored.

public void renderRemove (MarkupOutput out)

Renders the remove button information for the cart.
It overwrites the parent renderRemove method by initializing specific JavaScript code associated with the button.

Parameters
out MarkupOutput instance where the HTML content generated by this method will be saved

public void renderTreeJavaScript (MarkupOutput out)

Renders the JavaScript required for the tree control to behave correctly on user's browser.

Parameters
out MarkupOutput instance where the output HTML will be stored.

public void renderTreeStyle (MarkupOutput out)

Renders HTML for adding the stylesheet required for the prompt display to show correctly on the client's browser.

Parameters
out MarkupOutput instance where the output HTML will be stored.

Protected Methods

protected TreeNode addTreeNodeToList (WebDisplayUnit item, int level)

Adds WebDisplayUnit item to tree prompt.

Parameters
item WebDisplayUnit to be added to tree
level indicates tree node level
Returns

protected void cleanHierarchyList ()

Clears anything other than hierarchies from the list, for example, folders.
Overwrites the parent method since it checks for the folderItemsInTree formal parameter to see if they should be allowed on the list or not.

protected TreeCartExpression createTreeCartExpression ()

Create a new CartExpression using the GUIElement Factory

Returns
  • a new instance of the CartExpression

protected CartExpression getCartExpression ()

Returns an active CartExpression instance.
It makes sure this instance isn't null.

Returns

protected WebEvent getPromptEvent (int eventId)

Obtains an instance of WebEvent according to the event identifier indicated.

Parameters
eventId int value with the identifier of the event to obtain
Returns
  • WebEvent a WebEvent instance for the event identifier specified.

protected boolean isNodeComplex (WebNode node)

This method is deprecated.
This method has been deprecated since this is specific to expression prompts.
Use the method on AbstractPromptExpressionTransform.

Indicates if a single subexpression is complex.
An expression is complex if it cannot be created using the Web interface.
This method overrides isNodeComplex by supporting expressions of type DssXmlFilterListQual (element list expressions). It also checks if the styles supports attribute qualification, if it doesn't all other type of expressions are also considered complex, if it does, then it calls super.isNodeComplex to check if the expression is normally supported by attribute qualification

Parameters
node the root node of the subexpression to check
Returns
  • True if the Node is complex, that is, it cannot be created using this transform.

protected void processAvailableItems ()

Initializes the available units list.

Throws
WebObjectsException if an error happens while the prompt is initialized.

protected void processHierarchicalSubFolders ()

Parses hierarchy sub folder list and initialize collection for its rendering.
It parses hierarchy list and constructs a collection of sub folders to be displayed.

Throws
WebObjectsException thrown only if there's a problem when processing parent functionality.