Class PromptListboxTransform

    • Field Detail

      • multiSelect

        public FormalParameter multiSelect
        Boolean flag that specifies whether or not to enable multi-select in selected list.
        Not all prompt types and style support multiselect of elements, so even if this parameter is true, the multiselect functionality might not be available.
        This flag is used as a boolean value.
      • selectSize

        public FormalParameter selectSize
        The number of elements that the Selected list box displays.
        This flag is used as an int value.
    • Constructor Detail

      • PromptListboxTransform

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

      • renderAvailable

        public void renderAvailable​(MarkupOutput out)
        Renders the list of available items.
        Parameters:
        out - MarkupOutput the transform output
      • renderOpenSelect

        public void renderOpenSelect​(MarkupOutput out)
        Renders open HTML tag for Select list.
        Its size is defined by FP selectSize.
        Parameters:
        out - MarkupOutput where to write open select tag.
        Since:
        MicroStrategy Web 8.0.0
      • renderCloseSelect

        public void renderCloseSelect​(MarkupOutput out)
        Renders closing HTML tag for Select list.
        Parameters:
        out - MarkupOutput where to write closing HTML tag.
        Since:
        MicroStrategy Web 8.0.0
      • renderEmptyOption

        public void renderEmptyOption​(MarkupOutput out)
        Renders empty HTML option tag.
        It invokes overloaded function renderEmptyOption where new parameter availableSize is passed. THis parameter value corresponds to value defined in FP selectSize.
        Parameters:
        out - MarkupOutput where to write empty option.
        Since:
        MicroStrategy Web 8.0.0
      • renderEmptyOption

        public void renderEmptyOption​(MarkupOutput out,
                                      int availableSize)
        Renders empty HTML option tag.
        Empty option gets rendered only if availableSize is greater or equal than 1 and if 'None' option hasn't been displayed yet (isNoneOptionRendered() method).
        Parameters:
        out - MarkupOutput where to write empty option.
        availableSize - int indicating lenght of the list.
        Since:
        MicroStrategy Web 8.0.0
      • renderListOption

        public void renderListOption​(MarkupOutput out,
                                     WebDisplayUnit item)
        Renders HTML option tag populated with data from WebDisplayUnit instance.
        This is an overloaded method which acts as wrapper method. It determines whether or not current prompt answer is complex and passes it as parameter to wrapped method renderListOption().
        Parameters:
        out - MarkupOutput where to write HTML option tag.
        item -
      • renderListOption

        public void renderListOption​(MarkupOutput out,
                                     WebDisplayUnit item,
                                     boolean isComplexAnswer)
        Renders HTML option tag populated with data from WebDisplayUnit instance.
        It parses WebDisplayUnit item in order to get data to be used when creating HTML option tag. It uses HTMLHelper to create HTML option. It selects given HTML option if item isn't marked as selected and prompt answer isn't complex.
        Parameters:
        out - MarkupOutput where to write HTML option tag.
        item - WebDisplayUnit data structure where necessary data is obtained.
        isComplexAnswer - boolean true if prompt answer is complex.
        Since:
        MicroStrategy Web 8.0.0
      • isNoneOptionRendered

        protected boolean isNoneOptionRendered()
        Indicates whether or not 'none' options needs to be rendered as part of the available list.
        Returns:
        true if '-none-' is to be displayed
      • initializeCss

        public void initializeCss()
        Initialize the CSS information to be used by this transform.
        It invokes parent method so shared CSS get initialized as well.
        Overrides:
        initializeCss in class AbstractPromptObjectTransform
        Since:
        MicroStrategy Web 8.0.0
      • isAnswerComplex

        public boolean isAnswerComplex()
        Determines whether a prompt has a default answer, and if it has, if the default answer is complex. Complex answers are those that cannot be displayed by the prompt answer input interface, so they need to be rendered in a separate window
        Specified by:
        isAnswerComplex in class AbstractPromptObjectTransform
        Returns:
        true if the prompt has a default answer and it is complex.
      • getDescription

        public java.lang.String getDescription()
        This transforms description.
        Specified by:
        getDescription in interface Transform
        Returns:
        the description of the listbox.