public class

PromptObjectBrowsingXHTMLTransform

extends PromptCartXHTMLTransform
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.PromptObjectBrowsingXHTMLTransform

Class Overview

Renders prompt content in a "shopping cart" style with a browseable folder path.
It extends PromptCartTransform by adding a folder path above the prompt question and by allowing end-user to navigate to available subfolders. Also, it will only display objects that are defined in prompt definition; this means that if only templates are to be displayed then any instance will be displayed if found under given subfolder.

This transforms makes use of Tag instances to render HTML output. See reference to TagsFactory. 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 interface com.microstrategy.web.beans.EnumPromptsBeanEvents
Fields
public FormalParameter cssItemName Formal parameter of the prefix to append to all css class names.
[Expand]
Inherited Fields
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
PromptObjectBrowsingXHTMLTransform()
Default no-args constructor, initialize all the formal parameters.
Public Methods
boolean canTransform(Transformable data)
Indicates whether or not this component can be transformed.
String getDescription()
Indicates the description for this Transform.
void initializeCss()
Initialize the css information to be used by this transform.
void initializePromptContent()
Initializes prompt content information.
boolean isSearchAvailable()
Indicates whether or not Cart instance has 'search' area enabled or displayed.
boolean isThereAnyFolderToRender()
Determines whether there's a root folder as default point for browsing.
boolean isUpAndDownAvailable()
Indicates whether or not Cart instance has up/down arrows enabled.
void renderBackParentButton(MarkupOutput out)
Renders 'Back' button.
void renderCart(MarkupOutput out)
Renders a shopping cart output.
void renderFoldersPath(MarkupOutput out)
Renders folders formatted path text.
void renderLabel(MarkupOutput out, String labelName)
Renders an HTML label.
void renderParentPromptContent(MarkupOutput out)
Renders prompt content defined in parent class.
void renderPromptContent(MarkupOutput out)
Renders the prompt question layout content.
void renderSubFolderPullDown(MarkupOutput out)
Renders subfolders pull down menu.
Protected Methods
Enumeration getAvailableItems()
Returns an enumeration of all available items.
void updateIncrementalFetchCartProperties()
Updates incremental fetch properties in Cart object.
void writeAncestors(MarkupOutput out, SimpleList ancestors, int currentAncestor)
Recursevily renders folder anscestors names.
[Expand]
Inherited Methods
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

public FormalParameter cssItemName

Formal parameter of the prefix to append to all css class names.

Public Constructors

public PromptObjectBrowsingXHTMLTransform ()

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

Public Methods

public boolean canTransform (Transformable data)

Indicates whether or not this component can be transformed.
Extends canTransform() by returning true only if the prompt is of type EnumWebPromptType.WebPromptTypeObjects

Parameters
data object (PromptObject) to transform
Returns
  • true if the data is a PromptObject of a Expression WebPrompt.

public String getDescription ()

Indicates the description for this Transform.

Returns
  • String with the description for the transform.

public void initializeCss ()

Initialize the css information to be used by this transform.
It invokes parent method so all shared CSS are also initialized.

public void initializePromptContent ()

Initializes prompt content information.
Extends initializePromptContent() by calling processIncrementalFetch and processSelectedItems. It also initialize the Cart object associated.

Throws
WebObjectsException if something goes wrong when processing Available items.

public boolean isSearchAvailable ()

Indicates whether or not Cart instance has 'search' area enabled or displayed.

Returns
  • boolean true if enabled.

public boolean isThereAnyFolderToRender ()

Determines whether there's a root folder as default point for browsing.
This is determined only if there are folder objects in available units.

Returns
  • boolean true if there's a starting point for browsing.

public boolean isUpAndDownAvailable ()

Indicates whether or not Cart instance has up/down arrows enabled.

Returns
  • boolean true if enabled.

public void renderBackParentButton (MarkupOutput out)

Renders 'Back' button.
THis button will enable end-user to navigate the different folders available to the parent one.

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

public void renderCart (MarkupOutput out)

Renders a shopping cart output.
This is accomplished 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.
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 renderFoldersPath (MarkupOutput out)

Renders folders formatted path text.
The output is organized with a series of DIV HTML tags created.
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 renderLabel (MarkupOutput out, String labelName)

Renders an HTML label.

Parameters
out MarkupOutput instance where the output HTML will be stored.
labelName string of label to be displayed.

public void renderParentPromptContent (MarkupOutput out)

Renders prompt content defined in parent class.
It delegates responsability of rendering prompt's content to parent method renderCart().

Parameters
out MarkupOutput where to write output.

public void renderPromptContent (MarkupOutput out)

Renders the prompt question layout content.
This is accomplished by calling the renderCart() method. If there are no folders to render then it will simply call the parent's renderPromptContent method.

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

public void renderSubFolderPullDown (MarkupOutput out)

Renders subfolders pull down menu.

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

Protected Methods

protected Enumeration getAvailableItems ()

Returns an enumeration of all available items.
It gets all available display units and creates an Enumeration instance which is returned.

Returns
  • Enumeration of available elements.

protected void updateIncrementalFetchCartProperties ()

Updates incremental fetch properties in Cart object.
Mostly, the total of units is calculated after processing available units, hence, we need to reflect this in Cart incremental fetch properties only if Incremental fetch is enabled (isIncrementalFetchAvailable() is invoked). Incremental Fetch object is obtained from Prompt's cart infrastructure. This function updates its Block Count, Block Begin and Total count properties.

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

Recursevily renders folder anscestors names.

Parameters
out MarkupOutput where to write the output of the method.
ancestors SimpleList list of folder ancestors
currentAncestor int current ancestor being rendered.