Class PromptCheckboxTransform

    • Constructor Detail

      • PromptCheckboxTransform

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

      • isAnswerComplex

        public boolean isAnswerComplex()
        Indicates whether or not, given prompt is consisted of a complex answer.
        Checks 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.
      • canTransform

        public boolean canTransform​(Transformable data)
        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 EnumWebPromptType.WebPromptTypeObjects or EnumWebPromptType.WebPromptTypeElements
        Specified by:
        canTransform in interface Transform
        Overrides:
        canTransform in class AbstractTransform
        Parameters:
        data - PromptObject instance to transform
        Returns:
        true if the data is of type EnumWebPromptType.WebPromptTypeObjects or EnumWebPromptType.WebPromptTypeElements.
      • getDescription

        public java.lang.String getDescription()
        Indicates this transform's description.
        Specified by:
        getDescription in interface Transform
        Returns:
        the description of a checkbox answer.
      • getPromptsList

        public java.util.ArrayList getPromptsList()
        Creates an ArrayList collection from the available display units information.
        Overrides:
        getPromptsList in class AbstractPromptObjectTransform
        Returns:
        an ArrayList instance which can be empty.
        Since:
        MicroStrategy Web 8.0.0
      • renderDisplayNameLabel

        public void renderDisplayNameLabel​(MarkupOutput out,
                                           WebDisplayUnit item)
        Renders the display name of the WebDisplayUnit instance passed in as parameter.
        Parameters:
        out - MarkupOutput instance where to save the HTML content to display
        item - WebDisplayUnit instance from which the name will be rendered
        Since:
        MicroStrategy Web 8.0.0
      • renderDisplayNameLabel

        public void renderDisplayNameLabel​(MarkupOutput out,
                                           WebDisplayUnit item,
                                           java.lang.String displayName)
        Renders an HTML label tag.
        It uses displayName argument if not null which gets appended to HTML label.
        If displayName is an empty or null, item display Name is appended to label instead.
        Parameters:
        out - MarkupOutput where to write new HTML label.
        item - WebDisplayUnit instance which provides Display name to be appended if necessary.
        displayName - String text to be appended to label.
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptCheckbox

        public void renderPromptCheckbox​(MarkupOutput out,
                                         WebDisplayUnit item)
        Renders the WebDisplayUnit instance as a check box option for the prompt.
        Parameters:
        out - MarkupOutput instance where to save the HTML content to render
        item - WebDisplayUnit information to render
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptCheckbox

        public void renderPromptCheckbox​(MarkupOutput out,
                                         WebDisplayUnit item,
                                         java.lang.String argument,
                                         boolean isAnswerComplex,
                                         java.lang.String displayName)
        Renders the WebDisplayUnit instance as a check box option for the prompt.
        It takes an argument isAnswerComplext to determine whether or not to set checkbox on. If item is marked selected and there isn't any complex answer, then default to select given checkbox.
        Parameters:
        out - MarkupOutput instance where to save the HTML content to render
        item - WebDisplayUnit information to render
        argument - String indicating argument event.
        isAnswerComplex - boolean indicating that Prompt has complex answer.
        displayName - String text to be display along side checkbox (label).
        Since:
        MicroStrategy Web 8.0.0