public class

PromptHierarchicalTreeTransform

extends PromptHierarchicalCartTransform
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.PromptCartTransform
             ↳ com.microstrategy.web.app.transforms.PromptExpressionCartTransform
               ↳ com.microstrategy.web.app.transforms.PromptHierarchicalCartTransform
                 ↳ com.microstrategy.web.app.transforms.PromptHierarchicalTreeTransform

This class is deprecated.
Use PromptHierarchicalTreeXHTMLTransform instead

Class Overview

Renders Expression prompt in "tree" style.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.PromptHierarchicalCartTransform
From interface com.microstrategy.web.beans.EnumPromptsBeanEvents
Fields
protected String _attributeImage
protected String _attributeLockedImage
protected String _elementImage
protected String _folderImage Indicates name of Folder Image.
protected String _hierarchyImage
protected Vector _treeList Collection of tree nodes.
public FormalParameter attributeImage Image used to represent an attribute.
public FormalParameter attributeLockedImage Image used to represent a locked attribute.
public FormalParameter backToParentFolderImage Image for going up in browsing path for object prompts.
protected String browsePath
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.PromptHierarchicalCartTransform
From class com.microstrategy.web.app.transforms.PromptExpressionCartTransform
From class com.microstrategy.web.app.transforms.PromptCartTransform
From class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
From class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
Public Constructors
PromptHierarchicalTreeTransform()
Default constructor, no arguments.
Public Methods
boolean canHierarchyPaneBeShown()
Indicates whether or not Hierarchy pane can be displayed.
WebDisplayUnit getFirstNonHighlightedDimension(WebDisplayUnits units)
String getResourcesFolder(String folderType)
Wraps the AppContext's getResourceFolder method.
void initializeImages()
Initializes the images used in this transform.
void renderAdd(MarkupOutput out)
Renders 'Add' arrow HTML image button.
void renderAvailable(MarkupOutput out)
Renders available HTML list.
void renderBackParentButton(MarkupOutput out)
Renders HTML button to trigger back to parent folder.
void renderCart(MarkupOutput out)
Renders cart area in hierarchical prompt layout.
void renderFoldersPane(MarkupOutput out)
Renders folder's pull-down area in current prompt question.
void renderFoldersPath(MarkupOutput out)
Renders folder path, including current folder and its ancestors.
void renderHierarchiesPane(MarkupOutput out)
Renders hierarchies HTML pane.
void renderHierarchiesPaneContent(boolean enabled, MarkupOutput out)
This method is deprecated. Replaced by function renderHierarchiesPaneContent(MarkupOutput out, boolean enabled)
void renderHierarchiesPaneContent(MarkupOutput out, boolean enabled)
void renderPromptErrorMessage(MarkupOutput out)
Renders a localized generic error message to end-users.
void renderRemove(MarkupOutput out)
Renders 'Remove' arrow HTML image button.
void renderSubFolderPullDown(MarkupOutput out)
Renders HTML pull-down menu consisted of all existing subfolders.
Protected Methods
TreeNode addTreeNodeToList(WebDisplayUnit item, int level)
Adds WebDisplayUnit to current prompt tree.
void cleanHierarchyList()
Filters out from hierarchies list those items which aren't instances of WebDimension (Hierarchy).
CartExpression getCartExpression()
Returns a new CartExpression instance.
String getLabelForFolderFirstOption()
Indicates localized label to be displayed as first option in Subfolder's pull-down menu.
WebEvent getPromptEvent(int eventId)
Returns prompt event associate to given Id.
boolean isTreeSupported()
Indicates whether or not tree prompt style is supported.
void processAvailableItems()
Initializes the available units list.
void processHierarchicalSubFolders()
Parses hierarchy sub folder list and initialize collection for its rendering.
boolean promptsLoadedFirstTime()
Checks in request whether or not prompts are loaded the firt time.
void writeAncestors(MarkupOutput out, SimpleList ancestors, int currentAncestor)
Renders folder path denoting ancestors folders to current folder.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.PromptHierarchicalCartTransform
From class com.microstrategy.web.app.transforms.PromptExpressionCartTransform
From class com.microstrategy.web.app.transforms.PromptCartTransform
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.Transform

Fields

protected String _attributeImage

protected String _attributeLockedImage

protected String _elementImage

protected String _folderImage

Indicates name of Folder Image.

protected String _hierarchyImage

protected Vector _treeList

Collection of tree nodes.

public FormalParameter attributeImage

Image used to represent an attribute.

public FormalParameter attributeLockedImage

Image used to represent a locked attribute.

public FormalParameter backToParentFolderImage

Image for going up in browsing path for object prompts.
Object Prompts might support object browsing. This is done by displaying a browsing path above given prompt question. This path is similar to that used for displaying location of a given report. This image represents the button for allowing end-users to browse up in the hierarchy.

protected String browsePath

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 PromptHierarchicalTreeTransform ()

Default constructor, no arguments.

Public Methods

public boolean canHierarchyPaneBeShown ()

Indicates whether or not Hierarchy pane can be displayed.
Hierarchical Tree prompt won't display this pane if there aren't any hierarchies in collection. Also, it requires to have FP hierarchiesInTree set to False in order to invoke this method.

Returns
  • boolean true if it is to be displayed.

public WebDisplayUnit getFirstNonHighlightedDimension (WebDisplayUnits units)

public String getResourcesFolder (String folderType)

Wraps the AppContext's getResourceFolder method.
But it validates that the getBeanContext is indeed an AppContext.

Parameters
folderType the folder type
Returns
  • AppContext's getResourceFolder, or "" if not defined.

public void initializeImages ()

Initializes the images used in this transform.
It invokes parent method in order to get all shared images initialized as well.

public void renderAdd (MarkupOutput out)

Renders 'Add' arrow HTML image button.

Parameters
out where to write the output of the method.

public void renderAvailable (MarkupOutput out)

Renders available HTML list.
HTML list gets populated with items in prompt's available list.

Parameters
out where to write the output of the method.

public void renderBackParentButton (MarkupOutput out)

Renders HTML button to trigger back to parent folder.

Parameters
out MarkupOutput where to write HTML output

public void renderCart (MarkupOutput out)

Renders cart area in hierarchical prompt layout.
It calls renderAvailable, renderSelected and renderAdd/renderRemove methods.

Parameters
out where to write the output of the method.

public void renderFoldersPane (MarkupOutput out)

Renders folder's pull-down area in current prompt question.

Parameters
out MarkupOutput where to render folder layout.

public void renderFoldersPath (MarkupOutput out)

Renders folder path, including current folder and its ancestors.
It invokes writeAncestors() method.

Parameters
out MarkupOutput where to write output.

public void renderHierarchiesPane (MarkupOutput out)

Renders hierarchies HTML pane.

Parameters
out where to write the output of the method.

public void renderHierarchiesPaneContent (boolean enabled, MarkupOutput out)

This method is deprecated.
Replaced by function renderHierarchiesPaneContent(MarkupOutput out, boolean enabled)

public void renderHierarchiesPaneContent (MarkupOutput out, boolean enabled)

public void renderPromptErrorMessage (MarkupOutput out)

Renders a localized generic error message to end-users.
Error is displayed mostly when a validation fails either in backend or SDK. It is enabled in all prompt types and styles.

Parameters
out the transform output

public void renderRemove (MarkupOutput out)

Renders 'Remove' arrow HTML image button.

Parameters
out where to write the output of the method.

public void renderSubFolderPullDown (MarkupOutput out)

Renders HTML pull-down menu consisted of all existing subfolders.

Parameters
out MarkupOutput where to write HTML output.

Protected Methods

protected TreeNode addTreeNodeToList (WebDisplayUnit item, int level)

Adds WebDisplayUnit to current prompt tree.

Parameters
item WebDisplayUnit to be added to tree.
level int indicates tree node level.
Returns
  • TreeNode new instance.

protected void cleanHierarchyList ()

Filters out from hierarchies list those items which aren't instances of WebDimension (Hierarchy).
Clears anything other than hierarchies in the list, for example, folders.
Removes anything that isn't a Hierarchy.

protected CartExpression getCartExpression ()

Returns a new CartExpression instance.
If tree isn't supported, then parent method gets invoked instead. If global variable isn't initialized, then factory is used to create a new instances of CartExpression.

Returns

protected String getLabelForFolderFirstOption ()

Indicates localized label to be displayed as first option in Subfolder's pull-down menu.

Returns
  • String localized label.

protected WebEvent getPromptEvent (int eventId)

Returns prompt event associate to given Id.
It gets PromptsBean instance from which prompt event is obtained.

Parameters
eventId int indicating prompt event id.
Returns
  • WebEvent prompt event, it could be null.

protected boolean isTreeSupported ()

Indicates whether or not tree prompt style is supported.
Tree mode is only supported if it is dhtml mode and in IE 5.5 or greater.

Returns
  • boolean true if tree style is supported.

protected void processAvailableItems ()

Initializes the available units list.
If trees isn't supported (isTreeSupported() method), then parent method processAvailableItems() gets invoked. If supported, this function will parse available list of items and will start creating prompt tree structure.

Throws
WebObjectsException if a problem occurs when highlighting or populating any WebDisplayUnit instance.

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.

protected boolean promptsLoadedFirstTime ()

Checks in request whether or not prompts are loaded the firt time.
It looks for any 'prompt' hidden value in request indicating there was a prompt request to be processed. This means, user has started editing any prompt in report.

Returns
  • boolean true if there's no prompt request values.

protected void writeAncestors (MarkupOutput out, SimpleList ancestors, int currentAncestor)

Renders folder path denoting ancestors folders to current folder.

Parameters
out MarkupOutput where to write folder path
ancestors SimpleList collection of ancestors
currentAncestor int number of ancestors to be rendered.