public class

PromptCheckboxTransform

extends AbstractPromptObjectTransform
implements LayoutTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.transform.AbstractLayoutTransform
       ↳ com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
         ↳ com.microstrategy.web.app.transforms.PromptCheckboxTransform

Class Overview

Renders each available item with a checkbox, items checked become the answer.
This transforms makes use of Tag instances to render HTML output. See reference to TagsFactory.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.web.beans.EnumPromptsBeanEvents
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
Public Constructors
PromptCheckboxTransform()
Default no-args constructor, initialize all the formal parameters.
Public Methods
boolean canTransform(Transformable data)
Indicates whether or not given component (data) can be processed by this transform.
String getDescription()
Indicates this transform's description.
ArrayList getPromptsList()
Creates an ArrayList collection from the available display units information.
void initializeCss()
Initializes CSS information to be used by this transform.
boolean isAnswerComplex()
Indicates whether or not, given prompt is consisted of a complex answer.
void renderDisplayNameLabel(MarkupOutput out, WebDisplayUnit item)
Renders the display name of the WebDisplayUnit instance passed in as parameter.
void renderDisplayNameLabel(MarkupOutput out, WebDisplayUnit item, String displayName)
Renders an HTML label tag.
void renderPromptCheckbox(MarkupOutput out, WebDisplayUnit item, String argument, boolean isAnswerComplex, String displayName)
Renders the WebDisplayUnit instance as a check box option for the prompt.
void renderPromptCheckbox(MarkupOutput out, WebDisplayUnit item)
Renders the WebDisplayUnit instance as a check box option for the prompt.
void renderPromptContent(MarkupOutput out)
Renders the prompt's content in a layout designated for prompt questions.
Protected Methods
void setExtraArguments()
Specifies extra arguments for this prompt.
[Expand]
Inherited Methods
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

Public Constructors

public PromptCheckboxTransform ()

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

Public Methods

public boolean canTransform (Transformable data)

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

Parameters
data PromptObject instance to transform
Returns
  • true if the data is of type EnumWebPromptType.WebPromptTypeObjects or EnumWebPromptType.WebPromptTypeElements.

public String getDescription ()

Indicates this transform's description.

Returns
  • the description of a checkbox answer.

public ArrayList getPromptsList ()

Creates an ArrayList collection from the available display units information.

Returns
  • an ArrayList instance which can be empty.

public void initializeCss ()

Initializes CSS information to be used by this transform.

public boolean isAnswerComplex ()

Indicates whether or not, given prompt is consisted of a complex answer.
Checks whether a prompt has a default answer, and if it has, if the default answer is complex. Complex answers are those that cannot be displayed by the prompt answer input interface, so they need to be rendered in a separate window

Returns
  • true if the prompt has a default answer and it is complex.

public void renderDisplayNameLabel (MarkupOutput out, WebDisplayUnit item)

Renders the display name of the WebDisplayUnit instance passed in as parameter.

Parameters
out MarkupOutput instance where to save the HTML content to display
item WebDisplayUnit instance from which the name will be rendered

public void renderDisplayNameLabel (MarkupOutput out, WebDisplayUnit item, String displayName)

Renders an HTML label tag.
It uses displayName argument if not null which gets appended to HTML label.
If displayName is an empty or null, item display Name is appended to label instead.

Parameters
out MarkupOutput where to write new HTML label.
item WebDisplayUnit instance which provides Display name to be appended if necessary.
displayName String text to be appended to label.

public void renderPromptCheckbox (MarkupOutput out, WebDisplayUnit item, String argument, boolean isAnswerComplex, String displayName)

Renders the WebDisplayUnit instance as a check box option for the prompt.
It takes an argument isAnswerComplext to determine whether or not to set checkbox on. If item is marked selected and there isn't any complex answer, then default to select given checkbox.

Parameters
out MarkupOutput instance where to save the HTML content to render
item WebDisplayUnit information to render
argument String indicating argument event.
isAnswerComplex boolean indicating that Prompt has complex answer.
displayName String text to be display along side checkbox (label).

public void renderPromptCheckbox (MarkupOutput out, WebDisplayUnit item)

Renders the WebDisplayUnit instance as a check box option for the prompt.

Parameters
out MarkupOutput instance where to save the HTML content to render
item WebDisplayUnit information to render

public void renderPromptContent (MarkupOutput out)

Renders the prompt's content in a layout designated for prompt questions.

Parameters
out the transform output.

Protected Methods

protected void setExtraArguments ()

Specifies extra arguments for this prompt.
These arguments will be render later as hidden inputs.