public class

PromptRadioTransform

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.PromptRadioTransform

Class Overview

Renders each available item with a radio button, when one item is selected previous is deselected. The current selection becomes the answer.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.web.beans.EnumPromptsBeanEvents
Fields
public FormalParameter showNoneOption Specifies whether or not to radio option for 'none' for all non-required answer prompts.
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
Public Constructors
PromptRadioTransform()
Default no-args constructor, initialize all the formal parameters.
Public Methods
boolean canTransform(Transformable data)
Extends canTransform() by returning true only if the prompt is of type EnumWebPromptType.WebPromptTypeObjects or EnumWebPromptType.WebPromptTypeElements
String getDescription()
This transforms description
void initializeCss()
Initialize the css information to be used by this transform.
boolean isAnswerComplex()
Checks whether a prompt has a default answer, and if it has, if the default answer is complex.
void renderAvailable(MarkupOutput out)
Renders the available answers for this prompt.
void renderNoneRadioOption(MarkupOutput out, String argument, boolean isSelected)
Renders HTML radio option for 'None' option.
void renderNoneRadioOption(MarkupOutput out)
Renders HTML radio option for 'None' option.
void renderPromptContent(MarkupOutput out)
Renders the prompt content.
void renderRadioOption(MarkupOutput out, WebDisplayUnit item, String argument, boolean isAnswerComplex)
Renders HTML radio option populated with information stored in WebDisplayUnit.
void renderRadioOption(MarkupOutput out, WebDisplayUnit item)
Renders HTML radio option populated with information stored in WebDisplayUnit.
Protected Methods
void setExtraArguments()
Sets extra arguments for this prompt.
boolean shouldRenderNoneOption()
Indicates whether or not 'None' option should be displayed.
[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

Fields

public FormalParameter showNoneOption

Specifies whether or not to radio option for 'none' for all non-required answer prompts.
It indicates to render a radion button for 'none' answer as the first option in the list.
This parameter will be valid if given prompt doesn't require an prompt answer.
This flag is used as boolean value.

Public Constructors

public PromptRadioTransform ()

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

Public Methods

public boolean canTransform (Transformable data)

Extends canTransform() by returning true only if the prompt is of type EnumWebPromptType.WebPromptTypeObjects or EnumWebPromptType.WebPromptTypeElements

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

public String getDescription ()

This transforms description

Returns
  • the description of a radio button answer.

public void initializeCss ()

Initialize the css information to be used by this transform.
It invokes parent method so all shared CSS classes get initialized as well.

public boolean isAnswerComplex ()

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 renderAvailable (MarkupOutput out)

Renders the available answers for this prompt.

Parameters
out MarkupOutput the transform output

public void renderNoneRadioOption (MarkupOutput out, String argument, boolean isSelected)

Renders HTML radio option for 'None' option.

Parameters
out MarkupOutput where to write output
argument String unique id for HTML radio button.
isSelected boolean indicating whether or not to default to selected.

public void renderNoneRadioOption (MarkupOutput out)

Renders HTML radio option for 'None' option.

Parameters
out MarkupOutput where to write ouput.

public void renderPromptContent (MarkupOutput out)

Renders the prompt content.

Parameters
out MarkupOutput the transform output

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

Renders HTML radio option populated with information stored in WebDisplayUnit.

Parameters
out MarkupOutput where to write ouput.
item WebDisplayUnit instance containing info to be parsed.
argument String unique id for identifying given Radio button.
isAnswerComplex boolean true if answer is considered complex.

public void renderRadioOption (MarkupOutput out, WebDisplayUnit item)

Renders HTML radio option populated with information stored in WebDisplayUnit.

Parameters
out MarkupOutput where to write ouput.
item WebDisplayUnit instance containing info to be parsed.

Protected Methods

protected void setExtraArguments ()

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

protected boolean shouldRenderNoneOption ()

Indicates whether or not 'None' option should be displayed. WebPrompt instance determine whether or not to displaye the 'none' option.

Returns
  • boolean true if 'none' is to be displayed.