Class PromptCheckboxTransform
- 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
-
- All Implemented Interfaces:
EnumPromptsBeanEvents
,LayoutTransform
,Transform
public class PromptCheckboxTransform extends AbstractPromptObjectTransform implements LayoutTransform
Renders each available item with a checkbox, items checked become the answer.
This transforms makes use ofTag
instances to render HTML output. See reference toTagsFactory
.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
_blockCount, _calendar, _cssPrefix, _dataTypeForCalendar, _globalCss, _imagesFolder, cssPrefix, imgBackToTop, imgCalendar, imgError, isDhtmlMode, levelFlag, showRequired
-
Fields inherited from interface com.microstrategy.web.beans.EnumPromptsBeanEvents
ANSWER_SEPARATOR, EXPRESSION_SEPARATOR, ITEM_SEPARATOR, ITEM_SPECIAL_SEPARATOR, PROMPTS_EVENT_ADD_UNITS, PROMPTS_EVENT_ANSWER_ALL_PROMPTS, PROMPTS_EVENT_ANSWER_ANY_PROMPTS, PROMPTS_EVENT_ANSWER_CONSTANT_PROMPT, PROMPTS_EVENT_ANSWER_DIMTY_PROMPT, PROMPTS_EVENT_ANSWER_ELEMENTS_PROMPT, PROMPTS_EVENT_ANSWER_EXPRESSION_PROMPT, PROMPTS_EVENT_ANSWER_OBJECTS_PROMPT, PROMPTS_EVENT_ANSWER_PROMPTS_IN_ADVANCE, PROMPTS_EVENT_ARGUMENT_ACTION_ADD_UNITS, PROMPTS_EVENT_ARGUMENT_ACTION_ANSWER_PROMPT, PROMPTS_EVENT_ARGUMENT_ACTION_BROWSE_CHILD_FOLDER, PROMPTS_EVENT_ARGUMENT_ACTION_BROWSE_ELEMENT, PROMPTS_EVENT_ARGUMENT_ACTION_BROWSE_PARENT_FOLDER, PROMPTS_EVENT_ARGUMENT_ACTION_CANCEL_PROMPT, PROMPTS_EVENT_ARGUMENT_ACTION_CLEAR_EXISTING_AND_ADD_UNITS, PROMPTS_EVENT_ARGUMENT_ACTION_DRILL_WITHIN_HIERARCHY, PROMPTS_EVENT_ARGUMENT_ACTION_HIGHLIGHT_DIMENSION, PROMPTS_EVENT_ARGUMENT_ACTION_HIGHLIGHT_DIMENSION_ATTRIBUTE, PROMPTS_EVENT_ARGUMENT_ACTION_INCREMENTAL_FETCH, PROMPTS_EVENT_ARGUMENT_ACTION_REMOVE_UNITS, PROMPTS_EVENT_ARGUMENT_ACTION_SEARCH_BY_NAME, PROMPTS_EVENT_ARGUMENT_ACTION_SHOW_SUMMARY, PROMPTS_EVENT_ARGUMENT_ANSWER, PROMPTS_EVENT_ARGUMENT_ANSWER_FORMAT, PROMPTS_EVENT_ARGUMENT_ANSWER_MODE_OPTION, PROMPTS_EVENT_ARGUMENT_ANSWER_OPTIONS, PROMPTS_EVENT_ARGUMENT_ATTRIBUTE_ID, PROMPTS_EVENT_ARGUMENT_ATTRIBUTE_ID_AND_FORM_ID, PROMPTS_EVENT_ARGUMENT_BLOCK_BEGIN, PROMPTS_EVENT_ARGUMENT_BLOCK_COUNT, PROMPTS_EVENT_ARGUMENT_BROWSE_PATH, PROMPTS_EVENT_ARGUMENT_CALENDAR_BUTTON, PROMPTS_EVENT_ARGUMENT_CHILD_FOLDER_ID, PROMPTS_EVENT_ARGUMENT_DIMENSION_ID, PROMPTS_EVENT_ARGUMENT_DO_NOT_AUTO_REPROMPT, PROMPTS_EVENT_ARGUMENT_DRILL_TO_ATTRIBUTE_ID, PROMPTS_EVENT_ARGUMENT_EXEC_FLAGS, PROMPTS_EVENT_ARGUMENT_FILTER_STRING, PROMPTS_EVENT_ARGUMENT_FUNCTION, PROMPTS_EVENT_ARGUMENT_HIDDEN_ATTRIBUTE_ID, PROMPTS_EVENT_ARGUMENT_HIDDEN_DIMENSION_ID, PROMPTS_EVENT_ARGUMENT_INCREMENTAL_FETCH_GOTO_PAGE, PROMPTS_EVENT_ARGUMENT_LINK_ANSWERS, PROMPTS_EVENT_ARGUMENT_MATCH_CASE, PROMPTS_EVENT_ARGUMENT_MESSAGE_ALIAS, PROMPTS_EVENT_ARGUMENT_METRIC_ID, PROMPTS_EVENT_ARGUMENT_NAVIGATION, PROMPTS_EVENT_ARGUMENT_OBJECT_TYPE, PROMPTS_EVENT_ARGUMENT_ORIGIN_MESSAGE_ID, PROMPTS_EVENT_ARGUMENT_ORIGIN_SHORT_ANSWER_XML, PROMPTS_EVENT_ARGUMENT_PARENT_FOLDER_ID, PROMPTS_EVENT_ARGUMENT_PLAIN_ELEMENT_PROMPT_ANSWER, PROMPTS_EVENT_ARGUMENT_PLAIN_OBJECT_PROMPT_ANSWER, PROMPTS_EVENT_ARGUMENT_PLAIN_VALUE_PROMPT_ANSWER, PROMPTS_EVENT_ARGUMENT_PROMPT_POSITION, PROMPTS_EVENT_ARGUMENT_REOPEN_PROMPT, PROMPTS_EVENT_ARGUMENT_SAP_VARIABLE_EXCLUDE, PROMPTS_EVENT_ARGUMENT_SEARCH_NAME, PROMPTS_EVENT_ARGUMENT_SEARCH_ROOT, PROMPTS_EVENT_ARGUMENT_SRC_ANSWERS, PROMPTS_EVENT_ARGUMENT_SUB_ROOT_OPERATOR, PROMPTS_EVENT_ARGUMENT_SUBMIT_ANSWER, PROMPTS_EVENT_ARGUMENT_UNITS_TO_ADD, PROMPTS_EVENT_ARGUMENT_UNITS_TO_REMOVE, PROMPTS_EVENT_ARGUMENT_USE_SET_ANSWERS, PROMPTS_EVENT_ARGUMENT_USER_SEPARATOR, PROMPTS_EVENT_BROWSE_DIMENSION_ATTRIBUTE_ELEMENTS, PROMPTS_EVENT_BROWSE_ELEMENTS, PROMPTS_EVENT_BROWSE_HIERARCHICAL_CHILD_FOLDER, PROMPTS_EVENT_BROWSE_HIERARCHICAL_PARENT_FOLDER, PROMPTS_EVENT_CANCEL_ALL_PROMPTS, PROMPTS_EVENT_CANCEL_ANY_PROMPTS, PROMPTS_EVENT_CLEAR_EXISTING_AND_ADD_UNITS, PROMPTS_EVENT_CLEAR_HIERARCHICAL_SEARCH_EXPRESSION, PROMPTS_EVENT_DRILL_WITHIN_HIERARCHY, PROMPTS_EVENT_HIGHLIGHT_DIMENSION, PROMPTS_EVENT_HIGHLIGHT_DIMENSION_ATTRIBUTE, PROMPTS_EVENT_INCREMENTAL_FETCH, PROMPTS_EVENT_NAVIGATE_PROMPTS_BEAN, PROMPTS_EVENT_PROCESS_ALL_PROMPTS, PROMPTS_EVENT_PROCESS_ANY_PROMPTS, PROMPTS_EVENT_REMOVE_UNITS, PROMPTS_EVENT_SEARCH_BY_NAME, PROMPTS_EVENT_SHOW_ALL_PROMPTS_SUMMARY, PROMPTS_EVENT_SHOW_ANY_PROMPTS_SUMMARY, SIMPLE_SEPARATOR_CARET, SIMPLE_SEPARATOR_COMMA, SIMPLE_SEPARATOR_SEMICOLON, UNIT_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description PromptCheckboxTransform()
Default no-args constructor, initialize all the formal parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canTransform(Transformable data)
Indicates whether or not given component (data) can be processed by this transform.java.lang.String
getDescription()
Indicates this transform's description.java.util.ArrayList
getPromptsList()
Creates anArrayList
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 theWebDisplayUnit
instance passed in as parameter.void
renderDisplayNameLabel(MarkupOutput out, WebDisplayUnit item, java.lang.String displayName)
Renders an HTML label tag.void
renderPromptCheckbox(MarkupOutput out, WebDisplayUnit item)
Renders theWebDisplayUnit
instance as a check box option for the prompt.void
renderPromptCheckbox(MarkupOutput out, WebDisplayUnit item, java.lang.String argument, boolean isAnswerComplex, java.lang.String displayName)
Renders theWebDisplayUnit
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 void
setExtraArguments()
Specifies extra arguments for this prompt.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
addFormalParameter, arePromptsLoadedFirstTime, areThereAvailableSelections, checkLevel, getAnswerEvent, getArgumentName, getAttrElemBlockCount, getAvailableDisplayUnits, getCalendar, getContainerServices, getDescriptor, getDescriptor, getDescriptor, getDimensionAttribute, getDisplayHelper, getErrorMessage, getIntValue, getLocale, getMatchCaseSensitivity, getMultipleEvent, getMultipleEventArgumentString, getObjectsBlockCount, getPrompt, getPromptsAppContext, getPromptsBean, getRequestKeys, getShowRequired, getStringValue, getSupportedBeanType, getTagsFactory, hasAnswer, initializeImages, initializePromptContent, initializePromptObject, isBackToTopAnchorEnabled, isDhtmlMode, isDimensionalPrompt, isForDefinition, isIFrameRequest, isItemKeptInCartAvailable, isLocked, isLockedForSearch, isNodeComplex, isPromptObjectInitialized, isPromptRequired, isPromptSummaryEnabled, isTrue, isXDA_CustomSQL_Report, isXDA_MDX_Report, isXDAReport, newHiddenInputBuilder, newNamespaceEncoder, onBeforeApplyDefaultDisplaySettings, processAvailableItems, processIncrementalFetch, renderLayout, renderMinMaxHiddenValues, renderPromptAnswerMeaning, renderPromptBackToTopAnchor, renderPromptDefaultAnswer, renderPromptErrorMessage, renderPromptHiddenInputs, renderPromptIFrameRequest, renderPromptMeaning, renderPromptNoSelectionsAvailable, renderPromptNotAnswered, renderPromptQuestion, renderPromptRestrictions, renderPromptSummary, renderPromptSummaryAnswer, renderPromptSummaryTitle, renderPromptTitle, setArgumentValue, setAttrElemBlockCount, setEnableBackToTopAnchor, setIsItemKeptInCartAvailable, setLevelFlag, setLocale, setMatchCaseSensitivity, setObjectsBlockCount, setPromptSummary, setShowRequired, transform
-
Methods inherited from class com.microstrategy.web.transform.AbstractLayoutTransform
getLayoutContext, getLayoutDefinition, setLayoutDefinition, transformUsingLayout
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, getEvents, getFormalParams, getID, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.transform.LayoutTransform
getLayoutDefinition, setLayoutDefinition
-
Methods inherited from interface com.microstrategy.web.transform.Transform
getFormalParams, getID, getPreview, getSupportedBeanType, isPreviewAvailable, isResolved, supports, supports, transform
-
-
-
-
Method Detail
-
initializeCss
public void initializeCss()
Initializes CSS information to be used by this transform.- Overrides:
initializeCss
in classAbstractPromptObjectTransform
- Since:
- MicroStrategy Web 8.0.0
-
isAnswerComplex
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- Specified by:
isAnswerComplex
in classAbstractPromptObjectTransform
- Returns:
- true if the prompt has a default answer and it is complex.
-
canTransform
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 typeEnumWebPromptType.WebPromptTypeObjects
orEnumWebPromptType.WebPromptTypeElements
- Specified by:
canTransform
in interfaceTransform
- Overrides:
canTransform
in classAbstractTransform
- Parameters:
data
-PromptObject
instance to transform- Returns:
- true if the data is of type
EnumWebPromptType.WebPromptTypeObjects
orEnumWebPromptType.WebPromptTypeElements
.
-
getDescription
public java.lang.String getDescription()
Indicates this transform's description.- Specified by:
getDescription
in interfaceTransform
- Returns:
- the description of a checkbox answer.
-
setExtraArguments
protected void setExtraArguments()
Specifies extra arguments for this prompt.
These arguments will be render later as hidden inputs.- Overrides:
setExtraArguments
in classAbstractPromptObjectTransform
-
renderPromptContent
public void renderPromptContent(MarkupOutput out)
Renders the prompt's content in a layout designated for prompt questions.- Overrides:
renderPromptContent
in classAbstractPromptObjectTransform
- Parameters:
out
- the transform output.
-
getPromptsList
public java.util.ArrayList getPromptsList()
Creates anArrayList
collection from the available display units information.- Overrides:
getPromptsList
in classAbstractPromptObjectTransform
- Returns:
- an
ArrayList
instance which can be empty. - Since:
- MicroStrategy Web 8.0.0
-
renderDisplayNameLabel
public void renderDisplayNameLabel(MarkupOutput out, WebDisplayUnit item)
Renders the display name of theWebDisplayUnit
instance passed in as parameter.- Parameters:
out
-MarkupOutput
instance where to save the HTML content to displayitem
-WebDisplayUnit
instance from which the name will be rendered- Since:
- MicroStrategy Web 8.0.0
-
renderDisplayNameLabel
public void renderDisplayNameLabel(MarkupOutput out, WebDisplayUnit item, java.lang.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.- Since:
- MicroStrategy Web 8.0.0
-
renderPromptCheckbox
public void renderPromptCheckbox(MarkupOutput out, WebDisplayUnit item)
Renders theWebDisplayUnit
instance as a check box option for the prompt.- Parameters:
out
-MarkupOutput
instance where to save the HTML content to renderitem
-WebDisplayUnit
information to render- Since:
- MicroStrategy Web 8.0.0
-
renderPromptCheckbox
public void renderPromptCheckbox(MarkupOutput out, WebDisplayUnit item, java.lang.String argument, boolean isAnswerComplex, java.lang.String displayName)
Renders theWebDisplayUnit
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 renderitem
-WebDisplayUnit
information to renderargument
- String indicating argument event.isAnswerComplex
- boolean indicating that Prompt has complex answer.displayName
- String text to be display along side checkbox (label).- Since:
- MicroStrategy Web 8.0.0
-
-