Class PromptExpressionNonCartTransform
- 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.PromptExpressionNonCartTransform
-
- All Implemented Interfaces:
EnumPromptsBeanEvents
,LayoutTransform
,Transform
- Direct Known Subclasses:
PromptExpressionListTransform
,PromptExpressionTextboxTransform
public class PromptExpressionNonCartTransform extends AbstractPromptExpressionTransform implements LayoutTransform
Renders each available expression item with a radio button, when one item is selected previous is deselected. The current selection becomes 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 Modifier and Type Field Description protected java.lang.String
_availableArgument
Available list argument for select tag.protected java.lang.String
_availableLabel
Label used for rendering available listprotected java.lang.String
_inputLabel
Input label for input textfield.protected java.lang.String
_inputValue
Value of current prompt answer.protected int
_operator
Current operator or function IDprotected java.lang.String
_operatorArg
Indicates operator argument name.protected java.lang.String
_operatorDimensionality
Determines answer dimensionalityprotected java.lang.String
_operatorLabel
Operator label for operator pull-down menu.protected int
_operatorType
Current operator or function typeFormalParameter
inputSize
Specifies the size of the input textfield.FormalParameter
selectSize
The number of elements that the Selected list box displays.-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
attrFormTypeInAvailableList, defaultOperatorId, editMetricQualificationOutputLevel, inputFromTextFile
-
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 PromptExpressionNonCartTransform()
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)
Extends canTransform() by returning true only if the prompt is of typeEnumWebPromptType.WebPromptTypeExpression
protected void
displayOption(MarkupOutput out, java.lang.String argument, java.lang.String displayName, java.lang.String value, boolean isSelected)
Renders HTML option tag.protected void
displayOption(MarkupOutput out, java.lang.String argument, java.lang.String displayName, java.lang.String value, boolean isSelected, java.lang.String dataType)
Renders HTML option tag.protected WebExpression
getAnswer()
function that retrieves answer from given Web prompt object.protected java.lang.String
getDefaultShortcutId()
Parses current prompt answer in order to obtain shortcut Id.java.lang.String
getDescription()
This transforms descriptionprotected java.lang.String
getObjectIDfromAnswer()
Function that obtains from current answer first DisplayUnit Idvoid
initializeCss()
Initializes CSS information to be used by this transform.void
initializeFormalParameters()
Initializes formal parameters.void
initializePromptContent()
Initializes prompt content.boolean
isAnswerComplex()
Determines if current answer is complex or not.protected boolean
isNodeComplex(WebNode node)
This method checks if a single subexpression is Complex.protected void
processIncrementalFetch()
Initializes incremental fetching settings.protected void
processSelectedItems()
Initializes selected items list.void
renderAvailable(MarkupOutput out)
Renders Available list in HTML list component.void
renderAvailableLabel(MarkupOutput out)
Renders an HTML label associated to Available section.void
renderEditContentBelowInput(MarkupOutput out)
Renders the text and button that opens the output level editor.void
renderInput(MarkupOutput out)
Renders qualification value textbox.void
renderInputLabel(MarkupOutput out)
Renders an HTML label associated to value input section.void
renderOperatorLabel(MarkupOutput out)
Renders an HTML label associated to Operators section.void
renderOperators(MarkupOutput out)
Renders operators pull-down.void
renderPromptContent(MarkupOutput out)
Renders the prompt content.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
getDimtyAsString, getDimtyAttributesAsString, getOutputLevel, isBrowserIE6, isCart, isMQLevelEditingSupported, isNodeDimtyEmpty, renderHiddenInputsForMQEditor, renderOutputLevelLabel, renderPromptHiddenInputs, setExtraArguments, setMetricQualOutputLevelAndDimty
-
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, getPromptsList, getRequestKeys, getShowRequired, getStringValue, getSupportedBeanType, getTagsFactory, hasAnswer, initializeImages, initializePromptObject, isBackToTopAnchorEnabled, isDhtmlMode, isDimensionalPrompt, isForDefinition, isIFrameRequest, isItemKeptInCartAvailable, isLocked, isLockedForSearch, isPromptObjectInitialized, isPromptRequired, isPromptSummaryEnabled, isTrue, isXDA_CustomSQL_Report, isXDA_MDX_Report, isXDAReport, newHiddenInputBuilder, newNamespaceEncoder, onBeforeApplyDefaultDisplaySettings, processAvailableItems, renderLayout, renderMinMaxHiddenValues, renderPromptAnswerMeaning, renderPromptBackToTopAnchor, renderPromptDefaultAnswer, renderPromptErrorMessage, 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
-
-
-
-
Field Detail
-
inputSize
public FormalParameter inputSize
Specifies the size of the input textfield. This flag is used as an int value.
-
selectSize
public FormalParameter selectSize
The number of elements that the Selected list box displays. This flag is used as an int value.- Since:
- MicroStrategy Web 8.0.0
-
_operator
protected int _operator
Current operator or function ID
-
_operatorDimensionality
protected java.lang.String _operatorDimensionality
Determines answer dimensionality- Since:
- MicroStrategy Web 8.0.0
-
_operatorType
protected int _operatorType
Current operator or function type
-
_inputValue
protected java.lang.String _inputValue
Value of current prompt answer.
-
_availableLabel
protected java.lang.String _availableLabel
Label used for rendering available list
-
_operatorLabel
protected java.lang.String _operatorLabel
Operator label for operator pull-down menu.
-
_inputLabel
protected java.lang.String _inputLabel
Input label for input textfield.
-
_availableArgument
protected java.lang.String _availableArgument
Available list argument for select tag.
-
_operatorArg
protected java.lang.String _operatorArg
Indicates operator argument name.- Since:
- MicroStrategy Web 8.0.0
-
-
Method Detail
-
initializeFormalParameters
public void initializeFormalParameters()
Initializes formal parameters.
-
initializeCss
public void initializeCss()
Initializes CSS information to be used by this transform.- Overrides:
initializeCss
in classAbstractPromptObjectTransform
- Since:
- MicroStrategy Web 8.0.0
-
initializePromptContent
public void initializePromptContent() throws WebObjectsException
Initializes prompt content.
Extends initializePromptContent() by calling processIncrementalFetch and processSelectedItems. It also initialize the Cart object associated.- Overrides:
initializePromptContent
in classAbstractPromptObjectTransform
- Throws:
WebObjectsException
-
processIncrementalFetch
protected void processIncrementalFetch() throws WebObjectsException
Initializes incremental fetching settings.- Overrides:
processIncrementalFetch
in classAbstractPromptObjectTransform
- Throws:
WebObjectsException
-
processSelectedItems
protected void processSelectedItems() throws WebObjectsException
Initializes selected items list.
This cart only supports Element and Objects prompts lists.- Throws:
WebObjectsException
- when parsing each item in Selected list.
-
isAnswerComplex
public boolean isAnswerComplex()
Determines if current answer is complex or not.- Specified by:
isAnswerComplex
in classAbstractPromptObjectTransform
- Returns:
- true if answer is complex
-
isNodeComplex
protected boolean isNodeComplex(WebNode node)
This method checks if a single subexpression is Complex. An expression is complex if it cannot be created using the Web interface.
This is used by ExpressionPrompts transforms to determine if the Answer is Complex.- Overrides:
isNodeComplex
in classAbstractPromptExpressionTransform
- Parameters:
node
- the root node of the subexpression to check- Returns:
- True if the Node is complex, that is, it cannot be created using Web.
- Since:
- MicroStrategy Web 8.0.0
-
canTransform
public boolean canTransform(Transformable data)
Extends canTransform() by returning true only if the prompt is of typeEnumWebPromptType.WebPromptTypeExpression
- Specified by:
canTransform
in interfaceTransform
- Overrides:
canTransform
in classAbstractTransform
- Parameters:
data
- object (PromptObject) to transform- Returns:
- true if the data is a PromptObject of a Expression WebPrompt.
-
getDefaultShortcutId
protected java.lang.String getDefaultShortcutId()
Parses current prompt answer in order to obtain shortcut Id.- Returns:
- String ID of shortcut node.
-
getObjectIDfromAnswer
protected java.lang.String getObjectIDfromAnswer()
Function that obtains from current answer first DisplayUnit Id- Returns:
- text Id of given displayUnit in answer.
-
getAnswer
protected WebExpression getAnswer()
function that retrieves answer from given Web prompt object.- Returns:
- WebExpression instance that represents prompt current answer.
-
getDescription
public java.lang.String getDescription()
This transforms description- Specified by:
getDescription
in interfaceTransform
- Returns:
- the description of a radio button answer.
-
renderPromptContent
public void renderPromptContent(MarkupOutput out)
Renders the prompt content.- Overrides:
renderPromptContent
in classAbstractPromptObjectTransform
- Parameters:
out
-MarkupOutput
the transform output
-
renderAvailableLabel
public void renderAvailableLabel(MarkupOutput out)
Renders an HTML label associated to Available section.- Parameters:
out
- where to write HTML label.- Since:
- MicroStrategy Web 8.0.0
-
renderOperatorLabel
public void renderOperatorLabel(MarkupOutput out)
Renders an HTML label associated to Operators section.- Parameters:
out
- where to write HTML label.- Since:
- MicroStrategy Web 8.0.0
-
renderInputLabel
public void renderInputLabel(MarkupOutput out)
Renders an HTML label associated to value input section.- Parameters:
out
- where to write HTML label.- Since:
- MicroStrategy Web 8.0.0
-
renderAvailable
public void renderAvailable(MarkupOutput out)
Renders Available list in HTML list component.- Parameters:
out
-MarkupOutput
the transform output
-
renderOperators
public void renderOperators(MarkupOutput out)
Renders operators pull-down.- Parameters:
out
-MarkupOutput
where to write the output of the method.
-
renderInput
public void renderInput(MarkupOutput out)
Renders qualification value textbox.- Parameters:
out
-MarkupOutput
where to write the output of the method.
-
renderEditContentBelowInput
public void renderEditContentBelowInput(MarkupOutput out)
Renders the text and button that opens the output level editor.- Parameters:
out
- where to write the output of the method.- Since:
- MicroStrategy Web 8.0.0
-
displayOption
protected void displayOption(MarkupOutput out, java.lang.String argument, java.lang.String displayName, java.lang.String value, boolean isSelected)
Renders HTML option tag.
Used for creating list of options.- Parameters:
out
- the transform outputargument
- argument name for the option tagdisplayName
- display valuevalue
- what's submitted as valueisSelected
- indicates whether this option is selected
-
displayOption
protected void displayOption(MarkupOutput out, java.lang.String argument, java.lang.String displayName, java.lang.String value, boolean isSelected, java.lang.String dataType)
Renders HTML option tag.
Used for creating list of options.- Parameters:
out
- the transform outputargument
- argument name for the option tagdisplayName
- display valuevalue
- what's submitted as valueisSelected
- indicates whether this option is selecteddataType
- indicates data type for Tag property.
-
-