Class PromptExpressionCartXHTMLTransform
- 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.PromptExpressionCartXHTMLTransform
-
- All Implemented Interfaces:
EnumPromptsBeanEvents
,LayoutTransform
,Transform
- Direct Known Subclasses:
PromptExpressionCartWithPickerTransform
,PromptHierarchicalCartXHTMLTransform
public class PromptExpressionCartXHTMLTransform extends PromptCartXHTMLTransform
Renders Expression prompt in "shopping cart" style.
The output of this Transform generates well-formed XHTML, supports layout-xml, and it's designed to use external css files for all formatting.- Since:
- MicroStrategy Web 8.0.0
-
-
Field Summary
Fields Modifier and Type Field Description FormalParameter
loadFileSeparator
Specifies separator to be used when parsing uploaded file values.FormalParameter
logicalOperatorAvailableUserDefined
Specifies a custome boolean value indicating whether or not to displaye logical operators.FormalParameter
logicalOperatorDefault
Specifies 'And/Or' match case default value.FormalParameter
logicalOperatorSelectionMethod
Specifies whether the 'And/Or' match case checkbox is displayed or not next the selected list in cart style ouput.FormalParameter
truncateUploadedAnswersDisplay
Specifies whether or not to truncate selected list output to certain number of characters.FormalParameter
truncateUploadedAnswersDisplaySize
Specifies maximum number of characters displayed when truncate expression is requested.-
Fields inherited from class com.microstrategy.web.app.transforms.PromptCartXHTMLTransform
_imgBlank, availableSize, matchCase, searchAvailable, selectedSize
-
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 PromptExpressionCartXHTMLTransform()
Default no-args constructor, initialize all the formal parameters as Parent class has defined.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areUPandDownButtonsAvailable()
Indicates whether or not UP and Down buttons are enabled.boolean
canTransform(Transformable data)
Indicates whether or not, given component (data) can be processed by this transform.protected boolean
checkLogicalOperatorMethod(int iConst)
Validates whether or not, given operator mode (iConst) is enabled.protected CartExpression
createCartExpression()
Create a new CartExpression using the GUIElement Factoryprotected WebExpression
getAnswer()
Indicates the answer instance of the prompt being transformed.protected WebAttributeForms
getAttributeForms(WebAttribute attribute)
Returns collection of forms associated to given Attribute.protected Cart
getCart()
Returns instance of Cart object.protected CartExpression
getCartExpression()
Returns an instance of CartExpression object.java.lang.String
getDescription()
Indicates the description for this Transform.protected java.util.Enumeration
getSelectedItems()
Returns collection consisted of all selected items.void
initializeCart()
Initializes this transform'sCartExpression
instance properties to the default values required.void
initializeCss()
Initializes CSS information to be used by this transform.boolean
isAnswerComplex()
Determines whether or not current answer is complex.boolean
isCalendarAvailable()
Indicates whether or not Calendar object is enabled.protected boolean
isCart()
boolean
isExpressionAFilter()
Determines whether or not, prompt's expression type corresponds to a Filter.boolean
isExpressionAMetric()
Indicates whether or not prompt's expression is Metric Qualification.boolean
isInputFromTextFile()
Determines if the input for this prompt comes from text file or not.boolean
isNextInputButtonAvailable()
Indicates whether or not 'Next Input' button is enabled.protected void
processAvailableItems()
Indicates the list of avaialble units to display for this cart.protected void
processIncrementalFetch()
Initializes incremental fetching settings.protected void
processSelectedItems()
Initializes selected items list for this cart expression transform.void
renderAvailableLabel(MarkupOutput out)
Renders label associated to Available section.void
renderCalendarButton(MarkupOutput out)
Renders the calendar button information.void
renderCart(MarkupOutput out)
Renders a shopping cart output by calling different methods that will render the individual sections of the prompt layout.void
renderInputTextFile(MarkupOutput out)
Renders the text box input where the user will be enabled to enter or view the text file from where the prompt information comes up.void
renderMatch(MarkupOutput out)
Renders the AND or OR information for this cart expression.void
renderNextInputButton(MarkupOutput out)
Renders the Output Level box option.void
renderOperatorLabel(MarkupOutput out)
Renders label associated to Operators section.void
renderOperators(MarkupOutput out)
Renders the applicable operators for this prompt expression.void
renderPromptContent(MarkupOutput out)
Renders the prompt question layout content by calling therenderCart()
method.void
renderQualificationInputBox(MarkupOutput out)
Renders the text box input where the expression value may be written.-
Methods inherited from class com.microstrategy.web.app.transforms.PromptCartXHTMLTransform
areThereAvailableSelections, createCart, getAvailableItems, getErrorMessage, getSearchPattern, initializeFormalParameters, initializeImages, initializePromptContent, isIncrementalFetchAvailable, isSearchActive, isSearchAvailable, isSearchPossible, isUpDownArrowsAvailable, onBeforeApplyDefaultDisplaySettings, renderAdd, renderAddAll, renderAvailable, renderDown, renderIncrementalFetch, renderLabel, renderLabel, renderRemove, renderRemoveAll, renderSearch, renderSelected, renderUp, setExtraArguments, supports, supports, updateIncrementalFetchCartProperties
-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
getDimtyAsString, getDimtyAttributesAsString, getOutputLevel, isBrowserIE6, isMQLevelEditingSupported, isNodeComplex, isNodeDimtyEmpty, renderHiddenInputsForMQEditor, renderOutputLevelLabel, renderPromptHiddenInputs, setMetricQualOutputLevelAndDimty
-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
addFormalParameter, arePromptsLoadedFirstTime, checkLevel, getAnswerEvent, getArgumentName, getAttrElemBlockCount, getAvailableDisplayUnits, getCalendar, getContainerServices, getDescriptor, getDescriptor, getDescriptor, getDimensionAttribute, getDisplayHelper, getIntValue, getLocale, getMatchCaseSensitivity, getMultipleEvent, getMultipleEventArgumentString, getObjectsBlockCount, getPrompt, getPromptsAppContext, getPromptsBean, getPromptsList, getRequestKeys, getShowRequired, getStringValue, getSupportedBeanType, getTagsFactory, hasAnswer, initializePromptObject, isBackToTopAnchorEnabled, isDhtmlMode, isDimensionalPrompt, isForDefinition, isIFrameRequest, isItemKeptInCartAvailable, isLocked, isLockedForSearch, isPromptObjectInitialized, isPromptRequired, isPromptSummaryEnabled, isTrue, isXDA_CustomSQL_Report, isXDA_MDX_Report, isXDAReport, newHiddenInputBuilder, newNamespaceEncoder, 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
-
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, transform
-
-
-
-
Field Detail
-
logicalOperatorSelectionMethod
public FormalParameter logicalOperatorSelectionMethod
Specifies whether the 'And/Or' match case checkbox is displayed or not next the selected list in cart style ouput.
-
logicalOperatorDefault
public FormalParameter logicalOperatorDefault
Specifies 'And/Or' match case default value. The value for this formal parameter comes from the EnumDSSXMLFunction enumeration.
-
logicalOperatorAvailableUserDefined
public FormalParameter logicalOperatorAvailableUserDefined
Specifies a custome boolean value indicating whether or not to displaye logical operators.
-
loadFileSeparator
public FormalParameter loadFileSeparator
Specifies separator to be used when parsing uploaded file values.
-
truncateUploadedAnswersDisplay
public FormalParameter truncateUploadedAnswersDisplay
Specifies whether or not to truncate selected list output to certain number of characters.
This formal parameter will be ignored if uploading answers isn't enabled. Default value indicates not to truncate.
-
truncateUploadedAnswersDisplaySize
public FormalParameter truncateUploadedAnswersDisplaySize
Specifies maximum number of characters displayed when truncate expression is requested.
This formal parameter will be ignored if uploading answers isn't enabled. Default value is 100 characters.
-
-
Method Detail
-
isExpressionAMetric
public boolean isExpressionAMetric()
Indicates whether or not prompt's expression is Metric Qualification.
It gets prompts expression and compares its type againstEnumDSSXMLExpressionType.DssXmlFilterSingleMetricQual
.- Returns:
- boolean true if expression is a Metric Qualification.
-
initializeCart
public void initializeCart()
Initializes this transform'sCartExpression
instance properties to the default values required.- Overrides:
initializeCart
in classPromptCartXHTMLTransform
-
initializeCss
public void initializeCss()
Initializes CSS information to be used by this transform.- Overrides:
initializeCss
in classPromptCartXHTMLTransform
-
getAttributeForms
protected WebAttributeForms getAttributeForms(WebAttribute attribute)
Returns collection of forms associated to given Attribute.
It returns all forms if current Prompted report isn't an XDA MDX type. If that's the case, then it checks (WebExpressionPrompt.getDisplayedForms()) which kind of forms are to be returned.- Parameters:
attribute
- WebAttribute- Returns:
- WebAttributeForms
-
processAvailableItems
protected void processAvailableItems() throws WebObjectsException
Indicates the list of avaialble units to display for this cart.- Overrides:
processAvailableItems
in classAbstractPromptObjectTransform
- Throws:
WebObjectsException
- if an error happens while processing the information.
-
processSelectedItems
protected void processSelectedItems() throws WebObjectsException
Initializes selected items list for this cart expression transform.- Overrides:
processSelectedItems
in classPromptCartXHTMLTransform
- Throws:
WebObjectsException
- if an error happens while processing the information.
-
processIncrementalFetch
protected void processIncrementalFetch() throws WebObjectsException
Initializes incremental fetching settings.- Overrides:
processIncrementalFetch
in classAbstractPromptObjectTransform
- Throws:
WebObjectsException
-
isAnswerComplex
public boolean isAnswerComplex()
Determines whether or not current answer is complex.- Overrides:
isAnswerComplex
in classPromptCartXHTMLTransform
- Returns:
- boolean
True
if answer is complex.
-
isInputFromTextFile
public boolean isInputFromTextFile()
Determines if the input for this prompt comes from text file or not.
This is accomplished by checking theinputFromTextFile
formal parameter value.- Returns:
- boolean
True
if input of this prompt can come from text file.
-
isCalendarAvailable
public boolean isCalendarAvailable()
Indicates whether or not Calendar object is enabled.- Returns:
boolean
value indicating if a calendar is available for this prompt output, by asking theCart
initialized instanceisCalendarAvailable
.
-
canTransform
public boolean canTransform(Transformable data)
Indicates whether or not, given component (data) can be processed by this transform.
ExtendscanTransform
by returningTrue
only if the prompt is of typeEnumWebPromptType.WebPromptTypeExpression
- Specified by:
canTransform
in interfaceTransform
- Overrides:
canTransform
in classPromptCartXHTMLTransform
- Parameters:
data
- objectTransformable
instance withPromptObject
to transform- Returns:
- boolean
True
if the data is a transformable by this class.
-
getAnswer
protected WebExpression getAnswer()
Indicates the answer instance of the prompt being transformed.- Returns:
WebExpression
instance corresponding to the answer of thePromptObject
being transformed.
-
getSelectedItems
protected java.util.Enumeration getSelectedItems()
Returns collection consisted of all selected items.
ExtendsprocessSelectedItems
by giving support for prompts of the typeEnumWebPromptType.WebPromptTypeExpression
.- Overrides:
getSelectedItems
in classPromptCartXHTMLTransform
- Returns:
- an
Enumeration
initialized with the selected items list.
-
getCart
protected Cart getCart()
Returns instance of Cart object.
OverridesgetCart
by providing aCartExpression
given by thegetCartExpression
method.- Overrides:
getCart
in classPromptCartXHTMLTransform
- Returns:
Cart
instance related to this transform.
-
getCartExpression
protected CartExpression getCartExpression()
Returns an instance of CartExpression object.
An activeCartExpression
instance is returned, making sure this instance isn'tnull
.- Returns:
CartExpression
instance related to this transform.
-
createCartExpression
protected CartExpression createCartExpression()
Create a new CartExpression using the GUIElement Factory- Returns:
- a new instance of the CartExpression
- Since:
- MicroStrategy Web 8.0.1
-
getDescription
public java.lang.String getDescription()
Indicates the description for this Transform.- Specified by:
getDescription
in interfaceTransform
- Overrides:
getDescription
in classPromptCartXHTMLTransform
- Returns:
String
with the description for the transform.
-
checkLogicalOperatorMethod
protected boolean checkLogicalOperatorMethod(int iConst)
Validates whether or not, given operator mode (iConst) is enabled.
Test if thelogicalOperatorSelectionMethod
formal parameter value contains this flag- Parameters:
iConst
- logical operator mode flag to use for testing the formal parameter value- Returns:
True
if the level logical operator mode flag is included in thelogicalOperatorSelectionMethod
parameter value. Otherwise returnsFalse
.
-
renderPromptContent
public void renderPromptContent(MarkupOutput out)
Renders the prompt question layout content by calling therenderCart()
method.- Overrides:
renderPromptContent
in classPromptCartXHTMLTransform
- Parameters:
out
-MarkupOutput
instance where the output HTML will be stored.
-
renderCart
public void renderCart(MarkupOutput out)
Renders a shopping cart output by calling different methods that will render the individual sections of the prompt layout. The output is organized with a series ofDIV
HTML tags created.
The methods used for the cart output are listed below, whereout
is aMarkupOutput
instance where the HTML generated by these calls is saved.renderLabel(out, (String) _cart.getProperty(EnumCartProperties.AVAILABLE_LABEL), (String) _cart.getProperty(EnumCartProperties.AVAILABLE_ARGUMENT)); renderIncrementalFetch(out); renderAvailable(out); renderLabel(out, (String) _cart.getProperty(EnumCartProperties.OPERATOR_LABEL), (String) _cart.getProperty(EnumCartProperties.OPERATOR_ARGUMENT)); renderOperators(out); renderLabel(out, (String) _cart.getProperty(EnumCartProperties.INPUT_LABEL), (String) _cart.getProperty(EnumCartProperties.INPUT_ARGUMENT)); renderQualificationInputBox(out); if (((Boolean) _cart.getProperty(EnumCartProperties.BUTTON_NEXT_INPUT_AVAILABLE)).booleanValue()) { renderLabel(out, " ", null); renderNextInputButton(out); } renderAdd(out); renderRemove(out); renderLabel(out, (String) _cart.getProperty(EnumCartProperties.SELECTED_LABEL), (String) _cart.getProperty(EnumCartProperties.SELECTED_ARGUMENT)); renderSelected(out); if (((Boolean) _cart.getProperty(EnumCartProperties.UP_AND_DOWN_AVAILABLE)).booleanValue()) { renderUp(out); renderDown(out); } renderMatch(out); if (isCalendarAvailable()) { renderCalendarButton(out); } if (isInputFromTextFile()) { renderInputTextFile(out); }
- Overrides:
renderCart
in classPromptCartXHTMLTransform
- Parameters:
out
- where to write the output of the method.
-
renderAvailableLabel
public void renderAvailableLabel(MarkupOutput out)
Renders label associated to Available section.- Parameters:
out
- MarkupOutput where to write label.
-
renderOperatorLabel
public void renderOperatorLabel(MarkupOutput out)
Renders label associated to Operators section.- Parameters:
out
- MarkupOutput where to write label.
-
isNextInputButtonAvailable
public boolean isNextInputButtonAvailable()
Indicates whether or not 'Next Input' button is enabled.- Returns:
- boolean true if enabled.
-
isExpressionAFilter
public boolean isExpressionAFilter()
Determines whether or not, prompt's expression type corresponds to a Filter.- Returns:
- boolean true if expression is a Filter type.
-
areUPandDownButtonsAvailable
public boolean areUPandDownButtonsAvailable()
Indicates whether or not UP and Down buttons are enabled.- Returns:
- boolean true if enabled.
-
renderOperators
public void renderOperators(MarkupOutput out)
Renders the applicable operators for this prompt expression. Sample code for this method would be defined as follows:
_cart.renderOperators(out);
- Parameters:
out
-MarkupOutput
instance where the HTML content generated by this method will be saved
-
renderQualificationInputBox
public void renderQualificationInputBox(MarkupOutput out)
Renders the text box input where the expression value may be written.
Sample code for this method would be defined as follows:
_cart.renderInput(out);
- Parameters:
out
-MarkupOutput
instance where the HTML content generated by this method will be saved
-
renderNextInputButton
public void renderNextInputButton(MarkupOutput out)
Renders the Output Level box option. Sample code for this method would be defined as follows:
_cart.renderButtonNextInput(out);
- Parameters:
out
-MarkupOutput
instance where the HTML content generated by this method will be saved
-
renderMatch
public void renderMatch(MarkupOutput out)
Renders the AND or OR information for this cart expression. Sample code for this method would be defined as follows:
_cart.renderMatch(out);
- Parameters:
out
-MarkupOutput
instance where the HTML content generated by this method will be saved
-
renderCalendarButton
public void renderCalendarButton(MarkupOutput out)
Renders the calendar button information. Sample code for this method would be defined as follows:
_cart.getCalendar().showOrHideCalendarButton(out, (String) _cart.getProperty(EnumCartProperties.AVAILABLE_ARGUMENT));
- Parameters:
out
-MarkupOutput
instance where the HTML content generated by this method will be saved
-
renderInputTextFile
public void renderInputTextFile(MarkupOutput out)
Renders the text box input where the user will be enabled to enter or view the text file from where the prompt information comes up. Sample source code for this method would be defined as follows:
WebEvent event = getPromptsBean().getWebEvent(EnumPromptsBeanEvents.PROMPTS_EVENT_PROCESS_ALL_PROMPTS); if (event != null) { out.append(getDescriptor(1381)); //Descriptor: Import filter from a file: String argumentName = event.getArgumentName(EnumPageEvents.WebEventArgumentTextFileAnswer, getPrompt().getPromptPosition()); //the browse button. out.append("<INPUT TYPE=\"file\" NAME=\""); out.append(argumentName); out.append("\" LABEL=\""); out.append(getDescriptor(1825)); //Descriptor: Browse if (isDhtmlMode) { out.append("\" ONFOCUS=\"javascript: selectInOperator('" + getArgumentName(PROMPTS_EVENT_ARGUMENT_FUNCTION) + "');"); } out.append("\" SIZE=30 /> "); //Generating the dotted arrow image. String dottedArrowImgName = _imagesFolder + _dottedArrowImg.getValue(); HTMLHelper.generateIMG(out, 0, dottedArrowImgName, 39, 22, "", 0); out.append(" "); if (isDhtmlMode) { //Check the preferences the admin set for the file extensions. String sValidExtensions = ""; AppContext promptsAppContext = getPromptsAppContext(); if (promptsAppContext != null) { Preferences pref = promptsAppContext.getPreferences(); sValidExtensions = pref.getValue(EnumWebPreferences.WebPreferencePromptsUploadFileExtensions); } //We will append a script that sets the variables. out.append("<SCRIPT>"); out.append(" var sValidExtensions = '," + sValidExtensions + ",';"); out.append("var sInvalidFileMessage= '" + StringUtils.replaceString(getDescriptor(1261), "##", sValidExtensions) + "';"); out.append("var sEventID='" + String.valueOf(event.getID()) + "';"); out.append("</SCRIPT>"); } //the LoadFile button. String buttonName = event.getArgumentName(EnumPageEvents.WebEventArgumentLoadFile, getPrompt().getPromptPosition()); out.append("<INPUT TYPE=\"submit\" NAME=\""); out.append(buttonName); out.append("\" VALUE=\""); out.append(getDescriptor(1348)); //Descriptor: Load File out.append("\" ID=\"" + buttonName); if (isDhtmlMode) { out.append("\" ONCLICK=\"javascript: selectInOperator('" + getArgumentName(PROMPTS_EVENT_ARGUMENT_FUNCTION) + "'); return(checkFileExtension('" + argumentName + "'));"); } out.append("\" />"); }
- Parameters:
out
-MarkupOutput
instance where the HTML content generated by this method will be saved
-
isCart
protected boolean isCart()
- Overrides:
isCart
in classAbstractPromptExpressionTransform
- Since:
- MicroStrategy Web 8.0.2
-
-