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 |
![]() |
![]() |
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.
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected String | _imgBlank | Reference to a transparent image to use for display purposes | |||||||||
public FormalParameter | availableSize | The number of elements that the Available list box displays. | |||||||||
public FormalParameter | matchCase | Specifies whether the match case checkbox is displayed or not next to a search section. | |||||||||
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PromptCartXHTMLTransform()
Default no-args constructor, initialize all the formal parameters.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
areThereAvailableSelections()
Validates size of available selections is greater than zero.
| ||||||||||
boolean |
canTransform(Transformable data)
Indicates if the prompt is of type
WebPromptTypeObjects
WebPromptTypeDimty or WebPromptTypeElements . | ||||||||||
String |
getDescription()
Indicates the description for this Transform.
| ||||||||||
void |
initializeCart()
Initializes this transform's
Cart instance properties to the default values
required. | ||||||||||
void |
initializeCss()
Initializes the CSS information to be used by this transform.
| ||||||||||
void |
initializeFormalParameters()
Initialize formal parameters.
| ||||||||||
void |
initializeImages()
Initialize the images for this transform.
| ||||||||||
void |
initializePromptContent()
Initializes prompt content.
| ||||||||||
boolean |
isAnswerComplex()
Indicates if the answer can be rendered in the GUI.
| ||||||||||
boolean |
isSearchAvailable()
Indicates whether or not search area is displayable.
| ||||||||||
boolean |
isUpDownArrowsAvailable()
Indicates whether or not UP and DOWN arrows are displayable.
| ||||||||||
void |
renderAdd(MarkupOutput out)
Renders the add button information for the cart.
| ||||||||||
void |
renderAddAll(MarkupOutput out)
Renders the add all button information for the cart.
| ||||||||||
void |
renderAvailable(MarkupOutput out)
Renders the available list of elements on the cart.
| ||||||||||
void |
renderCart(MarkupOutput out)
Renders a shopping cart output by calling different methods that will render the individual sections
of the prompt layout.
| ||||||||||
void |
renderDown(MarkupOutput out)
Render the down button information for the cart.
| ||||||||||
void |
renderIncrementalFetch(MarkupOutput out)
Renders the incremental fetch information for the cart available list.
| ||||||||||
void |
renderLabel(MarkupOutput out, int descriptorId, String name)
Renders an HTML label tag.
| ||||||||||
void |
renderLabel(MarkupOutput out, String descriptor, String name)
Renders an HTML label tag.
| ||||||||||
void |
renderPromptContent(MarkupOutput out)
Renders the prompt question.
| ||||||||||
void |
renderRemove(MarkupOutput out)
Renders the remove button information for the cart.
| ||||||||||
void |
renderRemoveAll(MarkupOutput out)
Renders the remove all button information for the cart.
| ||||||||||
void |
renderSearch(MarkupOutput out)
Renders the search section of the cart.
| ||||||||||
void |
renderSelected(MarkupOutput out)
Renders the selected list information of the cart.
| ||||||||||
void |
renderUp(MarkupOutput out)
Render the up button information for the cart.
| ||||||||||
boolean |
supports(Transformable data)
Indicates whether or not this object is supported.
| ||||||||||
boolean |
supports(Class c)
Indicates whether given Class is supported.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Cart |
createCart()
Create a new instance of GUI Element Cart using the GUIElementFactory.
| ||||||||||
Enumeration |
getAvailableItems()
Indicates collection consisted of all available items.
| ||||||||||
Cart |
getCart()
Indicates an active Cart instance.
| ||||||||||
String |
getErrorMessage(WebBeanError promptError)
Specifies a localized error message.
| ||||||||||
String |
getSearchPattern()
Specifies the pattern text from the
PromptObject instance. | ||||||||||
Enumeration |
getSelectedItems()
Indicates collection consisted of all selected items.
| ||||||||||
boolean |
isIncrementalFetchAvailable()
Indicates whether incremental fetch feature is available.
| ||||||||||
boolean |
isSearchActive()
Indicates whether a search pattern was entered.
| ||||||||||
boolean |
isSearchPossible(WebDisplayUnit unit)
Indicates whether it's possible to filter elements based on the display unit.
| ||||||||||
void | onBeforeApplyDefaultDisplaySettings() | ||||||||||
void |
processSelectedItems()
Initializes selected items list for this cart transform.
| ||||||||||
void |
setExtraArguments()
Sets extra arguments for this prompt.
| ||||||||||
void |
updateIncrementalFetchCartProperties()
Updates incremental fetch properties in the Cart object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Reference to a transparent image to use for display purposes
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.
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.
Validates size of available selections is greater than zero.
True
if available selection is greater than zero. Returns False
otherwise.
Indicates if the prompt is of type WebPromptTypeObjects
WebPromptTypeDimty
or WebPromptTypeElements
.
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 Cart
instance properties to the default values
required.
Cart instance is obtained by calling function getCart()
Initializes the CSS information to be used by this transform.
It invokes parent function in order to initialize all shared CSS classes.
Initialize formal parameters.
Initialize the images for this transform.
Extends parent method which is also invoked in order to get all shared
images initialized as well.
Initializes prompt content.
Extends initializePromptContent
by calling
processSelectedItems
and it's own initializeCart
.
WebObjectsException | if an error happens while the prompt is initialized. |
---|
Indicates if the answer can be rendered in the GUI.
True
if answer is complex.
Indicates whether or not search area is displayable.
It reads Cart
property SEARCH_AVAILABLE
which indicates whether or not
search area can be displayed.
Indicates whether or not UP and DOWN arrows are displayable.
It reads Cart
property UP_AND_DOWN_AVAILABLE
which indicates whether or not
these arrows can be displayed.
Renders the add button information for the cart. Sample code for this method would be defined as follows:
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders the add all button information for the cart.
Generates JavaScript information to be associated with
the button if it's to be rendered on a DHTML environment.
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders the available list of elements on the cart. Sample code for this method would be defined as follows:
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.
out | MarkupOutput instance where the output HTML will be stored.
|
---|
Render the down button information for the cart.
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders the incremental fetch information for the cart available list.
It updates the incremental fetch information before rendering it.
out | MarkupOutput instance where the output HTML will be stored.
|
---|
Renders an HTML label tag.
Utility method for rendering a label tag on the HTML output to generate. Internally calls
the Cart
instance to render the label using its renderLabel
method.
out | MarkupOutput instance where the output HTML will be stored. |
---|---|
descriptorId | int identifier of the descriptor to display as label |
name | String value to assign to the for attribute of the LABEL HTML tag
to display.
|
Renders an HTML label tag.
Utility method for rendering a label tag on the HTML output to generate. Internally calls
the Cart
instance to render the label using its renderLabel
method.
out | MarkupOutput instance where the output HTML will be stored. |
---|---|
descriptor | String with the descriptor to display as label |
name | String value to assign to the for attribute of the LABEL HTML tag
to display.
|
Renders the prompt question.
It renders given prompt layout content by calling
the renderCart()
method.
out | MarkupOutput instance where the output HTML will be stored.
|
---|
Renders the remove button information for the cart.
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders the remove all button information for the cart. Generates JavaScript information to be associated with the button if it's to be rendered on a DHTML environment.
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders the search section of the cart.
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Renders the selected list information of the cart.
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Render the up button information for the cart.
out | MarkupOutput instance where the HTML content generated by this method will be saved
|
---|
Indicates whether or not this object is supported.
data | Transformable to be checked |
---|
Indicates whether given Class is supported.
c | Class to be checked |
---|
Create a new instance of GUI Element Cart using the GUIElementFactory.
Indicates collection consisted of all available items.
Get all available display units and create an Enumeration instance with them.
WebDisplayUnits
available items.
Specifies a localized error message.
Error message is associated to promptError code.
promptError | instance of WebBeanError , most likely an validation error thrown in process prompt phase. |
---|
String
. Text is localized to active language.
Specifies the pattern text from the PromptObject
instance.
This is accomplished by asking the user search pattern.
Indicates collection consisted of all selected items.
Get all selected display units and create an Enumeration instance with them.
For Level prompt:
the values from the enumeration are instances of WebDimtyUnit
For objects/elements prompt:
In DHTML mode, the values are instances of WebDisplayUnits
.
In HTML mode, the values are instances of WebDisplayUnitEntry
.
Indicates whether incremental fetch feature is available.
If there's already a predefined list of answers, then incremental fetch gets
disabled.
Indicates whether a search pattern was entered.
It looks at the getSearchPattern
method and if it isn't null
then
we determine user has entered a search pattern.
Indicates whether it's possible to filter elements based on the display unit.
unit | the display unit for which we want to check: |
---|
Initializes selected items list for this cart transform.
Which supports WebElementsPrompt
, WebObjectsPrompt
and WebDimtyPrompt
lists. Any other type will leave the list
as null
.
WebObjectsException | if an error happens while processing the information. |
---|
Sets extra arguments for this prompt.
These arguments will be render later as hidden inputs.
Updates incremental fetch properties in the Cart object.
The total of units is calculated after processing available units, hence, we
need to reflect this in Cart incremental fetch properties.