Class PromptCartTransform

    • Field Detail

      • findImage

        public FormalParameter findImage
        Deprecated.
        Image to submit searching for units.
      • _findImage

        protected java.lang.String _findImage
        Deprecated.
      • addImage

        public FormalParameter addImage
        Deprecated.
        Image to add units to the selected list.
      • _addImage

        protected java.lang.String _addImage
        Deprecated.
      • removeImage

        public FormalParameter removeImage
        Deprecated.
        Image to remove elements from the selected list.
      • _removeImage

        protected java.lang.String _removeImage
        Deprecated.
      • endImage

        public FormalParameter endImage
        Deprecated.
        Image to page to last list of units in incremental browsing.
      • _endImage

        protected java.lang.String _endImage
        Deprecated.
      • firstImage

        public FormalParameter firstImage
        Deprecated.
        Image to page to first list of units in incremental browsing.
      • _firstImage

        protected java.lang.String _firstImage
        Deprecated.
      • nextImage

        public FormalParameter nextImage
        Deprecated.
        Image to page to next block of units in incremental browsing.
      • _nextImage

        protected java.lang.String _nextImage
        Deprecated.
      • previousImage

        public FormalParameter previousImage
        Deprecated.
        Image to page to previous block of units in incremental browsing.
      • _previousImage

        protected java.lang.String _previousImage
        Deprecated.
      • searchAvailable

        public FormalParameter searchAvailable
        Deprecated.
        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.
      • availableSize

        public FormalParameter availableSize
        Deprecated.
        The number of elements that the Available list box displays.
        This flag is used as an int value.
      • selectedSize

        public FormalParameter selectedSize
        Deprecated.
        The number of elements that the Selected list box displays.
        This flag is used as an int value.
      • matchCase

        public FormalParameter matchCase
        Deprecated.
        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.
    • Constructor Detail

      • PromptCartTransform

        public PromptCartTransform()
        Deprecated.
        Default no-args constructor, initialize all the formal parameters.
    • Method Detail

      • initializeFormalParameters

        public void initializeFormalParameters()
        Deprecated.
        Initialize formal parameters.
      • initializeImages

        public void initializeImages()
        Deprecated.
        Initializes the images for this transform.
        This function has been extended and it invokes parent method as well.
        Overrides:
        initializeImages in class AbstractPromptObjectTransform
      • initializePromptContent

        public void initializePromptContent()
                                     throws WebObjectsException
        Deprecated.
        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.
        Overrides:
        initializePromptContent in class AbstractPromptObjectTransform
        Throws:
        WebObjectsException - if something goes wrong during initialization process.
      • getSearchPattern

        protected java.lang.String getSearchPattern()
        Deprecated.
        Returns search pattern text defined in Prompt Object.
        It calls getPrompt() method in order to get an instance of current Prompt object.
        Returns:
        String search pattern.
        Since:
        MicroStrategy Web 7.5.0
      • isAnswerComplex

        public boolean isAnswerComplex()
        Deprecated.
        Determines if the answer can be rendered in the GUI.
        Specified by:
        isAnswerComplex in class AbstractPromptObjectTransform
        Returns:
        boolean true if answer is complex.
      • canTransform

        public boolean canTransform​(Transformable data)
        Deprecated.
        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.
        Specified by:
        canTransform in interface Transform
        Overrides:
        canTransform in class AbstractTransform
        Parameters:
        data - object (PromptObject) to transform
        Returns:
        boolean true if the data is a PromptObject of a Expression WebPrompt.
      • isIncrementalFetchAvailable

        protected boolean isIncrementalFetchAvailable()
        Deprecated.
        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.
        Returns:
        boolean true incremental fetch is available.
      • isSearchPossible

        protected boolean isSearchPossible​(WebDisplayUnit unit)
        Deprecated.
        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.
        Parameters:
        unit - the display unit for which we want to check:
        Returns:
        true if it's possible to search (filter) elements of the given type.
      • processSelectedItems

        protected void processSelectedItems()
                                     throws WebObjectsException
        Deprecated.
        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.
        Throws:
        WebObjectsException - when invoking API functions in order to retrieve prompt answers.
      • isSearchActive

        protected boolean isSearchActive()
        Deprecated.
        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.
        Returns:
        boolean true if search is active.
      • initializeCart

        public void initializeCart()
        Deprecated.
        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.
      • renderPromptContent

        public void renderPromptContent​(MarkupOutput out)
        Deprecated.
        Renders layout where prompt's content will displayed.
        It calls renderCart method for rendering prompt question layout.
        Overrides:
        renderPromptContent in class AbstractPromptObjectTransform
        Parameters:
        out - where to write the output of the method.
      • renderCart

        public void renderCart​(MarkupOutput out)
        Deprecated.
        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.
        Parameters:
        out - where to write the output of the method.
      • updateIncrementalFetchCartProperties

        protected void updateIncrementalFetchCartProperties()
        Deprecated.
        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.
      • getErrorMessage

        protected java.lang.String getErrorMessage​(WebBeanError promptError)
        Deprecated.
        Returns a localized error message.
        Error message is associated to promptError code passed in.
        Overrides:
        getErrorMessage in class AbstractPromptObjectTransform
        Parameters:
        promptError - instance of WebBeanError, most likely an validation error thrown in process prompt phase.
        Returns:
        error message as String. Error is localized to active language
      • setExtraArguments

        protected void setExtraArguments()
        Deprecated.
        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.
        Overrides:
        setExtraArguments in class AbstractPromptExpressionTransform
      • getCart

        protected Cart getCart()
        Deprecated.
        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:
        Cart instance.
      • getAvailableItems

        protected java.util.Enumeration getAvailableItems()
        Deprecated.
        Returns all available items encapsulated in Enumeration class.
        It gets all available display units and creates an Enumeration instance which is returned.
        Returns:
        Enumeration of WebDisplayUnits objects.
      • getSelectedItems

        protected java.util.Enumeration getSelectedItems()
        Deprecated.
        Returns an enumeration of all selected items.
        It gets all selected display units and creates an Enumeration instance which is returned.
        Returns:
        Enumeration of WebDisplayUnits objects.
      • getDescription

        public java.lang.String getDescription()
        Deprecated.
        Returns a description of this transform.
        Returns:
        String text description.
      • areThereAvailableSelections

        public boolean areThereAvailableSelections()
        Deprecated.
        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.
        Overrides:
        areThereAvailableSelections in class AbstractPromptObjectTransform
        Returns:
        boolean true if available selection is greater than 0