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.PromptCartTransform |
![]() |
![]() |
This class is deprecated.
Use PromptCartXHTMLTransform
instead
Renders prompt content in a "shopping cart" style. It provides of minimun settings for creating simplest prompt cart style. This class is extended by different types of prompts specializing current behavior for meeting prompt specific needs.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected String | _addImage | ||||||||||
protected String | _endImage | ||||||||||
protected String | _findImage | ||||||||||
protected String | _firstImage | ||||||||||
protected String | _nextImage | ||||||||||
protected String | _previousImage | ||||||||||
protected String | _removeImage | ||||||||||
public FormalParameter | addImage | Image to add units to the selected list. | |||||||||
public FormalParameter | availableSize | The number of elements that the Available list box displays. | |||||||||
public FormalParameter | endImage | Image to page to last list of units in incremental browsing. | |||||||||
public FormalParameter | findImage | Image to submit searching for units. | |||||||||
public FormalParameter | firstImage | Image to page to first list of units in incremental browsing. | |||||||||
public FormalParameter | matchCase | Specifies whether the match case checkbox is displayed or not next to a search section. | |||||||||
public FormalParameter | nextImage | Image to page to next block of units in incremental browsing. | |||||||||
public FormalParameter | previousImage | Image to page to previous block of units in incremental browsing. | |||||||||
public FormalParameter | removeImage | Image to remove elements from the selected list. | |||||||||
public FormalParameter | searchAvailable | Specifies whether the transform should display a search section. | |||||||||
public FormalParameter | selectedSize | The number of elements that the Selected list box displays. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PromptCartTransform()
Default no-args constructor, initialize all the formal parameters.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
areThereAvailableSelections()
Indicates whether or not there is a least one item in available collection,
Verifies size of available selections is greater than zero. | ||||||||||
boolean |
canTransform(Transformable data)
Indicates whether or not this given transform can be used to transform given component.
| ||||||||||
String |
getDescription()
Returns a description of this transform.
| ||||||||||
void |
initializeCart()
Initializes all Cart properties to default values.
| ||||||||||
void |
initializeFormalParameters()
Initialize formal parameters.
| ||||||||||
void |
initializeImages()
Initializes the images for this transform.
| ||||||||||
void |
initializePromptContent()
Initializes prompt's content.
| ||||||||||
boolean |
isAnswerComplex()
Determines if the answer can be rendered in the GUI.
| ||||||||||
void |
renderCart(MarkupOutput out)
Renders shopping's cart area.
| ||||||||||
void |
renderPromptContent(MarkupOutput out)
Renders layout where prompt's content will displayed.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Enumeration |
getAvailableItems()
Returns all available items encapsulated in Enumeration class.
| ||||||||||
Cart |
getCart()
Returns active cart instance.
| ||||||||||
String |
getErrorMessage(WebBeanError promptError)
Returns a localized error message.
| ||||||||||
String |
getSearchPattern()
Returns search pattern text defined in Prompt Object.
| ||||||||||
Enumeration |
getSelectedItems()
Returns an enumeration of all selected items.
| ||||||||||
boolean |
isIncrementalFetchAvailable()
Indicates whether or not, incremental fetch feature is available.
| ||||||||||
boolean |
isSearchActive()
Indicates whether a search patter was entered or not.
| ||||||||||
boolean |
isSearchPossible(WebDisplayUnit unit)
Indicates whether or not it's possible to filter elements based on the display unit object.
| ||||||||||
void |
processSelectedItems()
Initialize selected items list.
| ||||||||||
void |
setExtraArguments()
Specifies extra arguments for this prompt.
| ||||||||||
void |
updateIncrementalFetchCartProperties()
Updates incremental fetch properties in Cart object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
The number of elements that the Available list box displays.
This flag is used as an int value.
Specifies whether the match case checkbox is displayed or not next to a search section.
Indicates whether or not to show match case checkbox next to search section.
Not all prompt types support searching for elements, so even if this parameter is true, the search box might not be available.
This flag is used as a boolean value.
Image to page to previous block of units in incremental browsing.
Specifies whether the transform should display a search section.
Not all prompt types support searching for elements, so even if this parameter is true, the search box might not be available.
This flag is used as a boolean value.
The number of elements that the Selected list box displays.
This flag is used as an int value.
Default no-args constructor, initialize all the formal parameters.
Indicates whether or not there is a least one item in available collection,
Verifies size of available selections is greater than zero.
Returns false when selections are less or equal to zero.
Indicates whether or not this given transform can be used to transform given component.
Data should be instance of PromptObject, either an Object, Element or Dimension prompt type.
Returns true only if the prompt is of type EnumWebPromptType.WebPromptTypeObjects
or EnumWebPromptType.WebPromptTypeElements
.
data | object (PromptObject) to transform |
---|
Returns a description of this transform.
Initializes all Cart properties to default values.
Cart instance used by this transform needs to be initialized accordingly. Properties for controlling
Incremental fetch, Javascript functions, etc are specified in the method.
Cart instance is retrieve by invoking getCart() method which returns an instance of Cart object.
Initialize formal parameters.
Initializes the images for this transform.
This function has been extended and it invokes parent method as well.
Initializes prompt's content.
Extends initializePromptContent() by calling processIncrementalFetch and processSelectedItems.
Parent method gets also invoked. Then, processSelectedItems() method is invoked.
It also initialize the Cart object associated by invoking initializeCart() method.
WebObjectsException | if something goes wrong during initialization process. |
---|
Determines if the answer can be rendered in the GUI.
Renders shopping's cart area.
Prior to rendering the cart, incremental fetch values are updated.
Within the cart object, flow executes renderAvailable(), renderArrows() and renderSelected()
methods.
out | where to write the output of the method. |
---|
Renders layout where prompt's content will displayed.
It calls renderCart method for rendering prompt question layout.
out | where to write the output of the method. |
---|
Returns all available items encapsulated in Enumeration class.
It gets all available display units and creates an Enumeration
instance which is returned.
Returns active cart instance.
Makes sure this instance isn't null and if it's, a new one is created through GUI element factory.
Returns a localized error message.
Error message is associated to promptError code passed in.
promptError | instance of WebBeanError, most likely an validation error thrown in process prompt phase. |
---|
Returns search pattern text defined in Prompt Object.
It calls getPrompt() method in order to get an instance of current Prompt object.
Returns an enumeration of all selected items.
It gets all selected display units and creates an Enumeration
instance which is returned.
Indicates whether or not, incremental fetch feature is available.
Only element or object prompt types are allowed to expose incremental fetch and
if there's already a predefined list of answers, then incremental fetch gets
disabled.
Indicates whether a search patter was entered or not.
It looks at PromptObject's user search pattern and if it isn't null then
we determine user has entered a search pattern.
Indicates whether or not it's possible to filter elements based on the display unit object.
If given unit is a WebElementsPrompt or WebObjectsPrompt instance, then it returns false only
if it has a pre-defined list or there an active search in progress.
If given unit is an WebDimensionAttribute instance, it gets its WebAttribure object and calls recursively isSearchPossible() function,
For WebAttribute instances, search isn't possible if any of the attribute's form happens to have a Date datatype.
unit | the display unit for which we want to check: |
---|
Initialize selected items list.
This cart only supports Element and Objects prompts lists.
It gets prompt answer and from it, it obtains its enumeration instance which
contains all possible answers.
WebObjectsException | when invoking API functions in order to retrieve prompt answers. |
---|
Specifies extra arguments for this prompt.
Arguments such as answer format are initialized here. If DHTML mode is on, answer format
is set to Flat (values defined in EnumPromptAnswerFormat enumeration). If HTML is on
then, answer format is set to List.
Also, if DHTML is on, answer argument is set to empty string because answers will processed
from given string in request.
These arguments will be render later as hidden inputs.
Updates incremental fetch properties in Cart object.
Mostly, the total of units is calculated after processing available units, hence, we
need to reflect this in Cart incremental fetch properties.