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 |
![]() |
![]() |
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.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public FormalParameter | loadFileSeparator | Specifies separator to be used when parsing uploaded file values. | |||||||||
public FormalParameter | logicalOperatorAvailableUserDefined | Specifies a custome boolean value indicating whether or not to displaye logical operators. | |||||||||
public FormalParameter | logicalOperatorDefault | Specifies 'And/Or' match case default value. | |||||||||
public FormalParameter | logicalOperatorSelectionMethod | Specifies whether the 'And/Or' match case checkbox is displayed or not next the selected list in cart style ouput. | |||||||||
public FormalParameter | truncateUploadedAnswersDisplay | Specifies whether or not to truncate selected list output to certain number of characters. | |||||||||
public FormalParameter | truncateUploadedAnswersDisplaySize | Specifies maximum number of characters displayed when truncate expression is requested. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PromptExpressionCartXHTMLTransform()
Default no-args constructor, initialize all the formal parameters as
Parent class has defined.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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.
| ||||||||||
String |
getDescription()
Indicates the description for this Transform.
| ||||||||||
void |
initializeCart()
Initializes this transform's
CartExpression 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.
| ||||||||||
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.
| ||||||||||
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
the
renderCart() method. | ||||||||||
void |
renderQualificationInputBox(MarkupOutput out)
Renders the text box input where the expression value may be written.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
checkLogicalOperatorMethod(int iConst)
Validates whether or not, given operator mode (iConst) is enabled.
| ||||||||||
CartExpression |
createCartExpression()
Create a new CartExpression using the GUIElement Factory
| ||||||||||
WebExpression |
getAnswer()
Indicates the answer instance of the prompt being transformed.
| ||||||||||
WebAttributeForms |
getAttributeForms(WebAttribute attribute)
Returns collection of forms associated to given Attribute.
| ||||||||||
Cart |
getCart()
Returns instance of Cart object.
| ||||||||||
CartExpression |
getCartExpression()
Returns an instance of CartExpression object.
| ||||||||||
Enumeration |
getSelectedItems()
Returns collection consisted of all selected items.
| ||||||||||
boolean | isCart() | ||||||||||
void |
processAvailableItems()
Indicates the list of avaialble units to display for this cart.
| ||||||||||
void |
processIncrementalFetch()
Initializes incremental fetching settings.
| ||||||||||
void |
processSelectedItems()
Initializes selected items list for this cart expression transform.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Specifies separator to be used when parsing uploaded file values.
Specifies a custome boolean value indicating whether or not to displaye logical operators.
Specifies 'And/Or' match case default value. The value for this formal parameter comes from the EnumDSSXMLFunction enumeration.
Specifies whether the 'And/Or' match case checkbox is displayed or not next the selected list in cart style ouput.
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.
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.
Default no-args constructor, initialize all the formal parameters as Parent class has defined.
Indicates whether or not UP and Down buttons are enabled.
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 WebPromptTypeExpression
data | object Transformable instance with PromptObject to transform |
---|
True
if the data is a transformable by this class.
Indicates the description for this Transform.
String
with the description for the transform.
Initializes this transform's CartExpression
instance properties to the default values
required.
Initializes CSS information to be used by this transform.
Determines whether or not current answer is complex.
True
if answer is complex.
Indicates whether or not Calendar object is enabled.
boolean
value indicating if a calendar
is available for this prompt output, by asking the
Cart
initialized
instance isCalendarAvailable
.
Determines whether or not, prompt's expression type corresponds to a Filter.
Indicates whether or not prompt's expression is Metric Qualification.
It gets prompts expression and compares its type against DssXmlFilterSingleMetricQual
.
Determines if the input for this prompt comes from text file or not.
This is accomplished by checking the inputFromTextFile
formal parameter value.
True
if input of this prompt can come from text file.
Indicates whether or not 'Next Input' button is enabled.
Renders label associated to Available section.
out | MarkupOutput where to write label. |
---|
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));
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
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 of DIV
HTML tags created.
The methods used for the cart output are listed below, where out
is a MarkupOutput
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); }
out | where to write the output of the method. |
---|
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("\" />"); }
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders the AND or OR information for this cart expression. Sample code for this method would be defined as follows:
_cart.renderMatch(out);
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders the Output Level box option. Sample code for this method would be defined as follows:
_cart.renderButtonNextInput(out);
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders label associated to Operators section.
out | MarkupOutput where to write label. |
---|
Renders the applicable operators for this prompt expression. Sample code for this method would be defined as follows:
_cart.renderOperators(out);
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders the prompt question layout content by calling
the renderCart()
method.
out | MarkupOutput instance where the output HTML will be stored.
|
---|
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);
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Validates whether or not, given operator mode (iConst) is enabled.
Test if the logicalOperatorSelectionMethod
formal parameter value contains this flag
iConst | logical operator mode flag to use for testing the formal parameter value |
---|
True
if the level logical operator mode flag is included
in the logicalOperatorSelectionMethod
parameter value. Otherwise returns False
.
Create a new CartExpression using the GUIElement Factory
Indicates the answer instance of the prompt being transformed.
WebExpression
instance corresponding to the answer of the PromptObject
being
transformed.
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.
attribute | WebAttribute |
---|
Returns instance of Cart object.
Overrides getCart
by providing a CartExpression
given by the
getCartExpression
method.
Cart
instance related to this transform.
Returns an instance of CartExpression object.
An active CartExpression
instance is returned, making sure this instance isn't null
.
CartExpression
instance related to this transform.
Returns collection consisted of all selected items.
Extends processSelectedItems
by giving support for prompts
of the type WebPromptTypeExpression
.
Indicates the list of avaialble units to display for this cart.
WebObjectsException | if an error happens while processing the information. |
---|
Initializes incremental fetching settings.
WebObjectsException |
---|
Initializes selected items list for this cart expression transform.
WebObjectsException | if an error happens while processing the information. |
---|