Class PromptRadioTransform

    • Field Detail

      • showNoneOption

        public FormalParameter showNoneOption
        Specifies whether or not to radio option for 'none' for all non-required answer prompts.
        It indicates to render a radion button for 'none' answer as the first option in the list.
        This parameter will be valid if given prompt doesn't require an prompt answer.
        This flag is used as boolean value.
        Since:
        MicroStrategy Web 8.0.0
    • Constructor Detail

      • PromptRadioTransform

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

      • renderAvailable

        public void renderAvailable​(MarkupOutput out)
        Renders the available answers for this prompt.
        Parameters:
        out - MarkupOutput the transform output
      • renderRadioOption

        public void renderRadioOption​(MarkupOutput out,
                                      WebDisplayUnit item)
        Renders HTML radio option populated with information stored in WebDisplayUnit.
        Parameters:
        out - MarkupOutput where to write ouput.
        item - WebDisplayUnit instance containing info to be parsed.
        Since:
        MicroStrategy Web 8.0.0
      • renderNoneRadioOption

        public void renderNoneRadioOption​(MarkupOutput out)
        Renders HTML radio option for 'None' option.
        Parameters:
        out - MarkupOutput where to write ouput.
        Since:
        MicroStrategy Web 8.0.0
      • renderNoneRadioOption

        public void renderNoneRadioOption​(MarkupOutput out,
                                          java.lang.String argument,
                                          boolean isSelected)
        Renders HTML radio option for 'None' option.
        Parameters:
        out - MarkupOutput where to write output
        argument - String unique id for HTML radio button.
        isSelected - boolean indicating whether or not to default to selected.
        Since:
        MicroStrategy Web 8.0.0
      • renderRadioOption

        public void renderRadioOption​(MarkupOutput out,
                                      WebDisplayUnit item,
                                      java.lang.String argument,
                                      boolean isAnswerComplex)
        Renders HTML radio option populated with information stored in WebDisplayUnit.
        Parameters:
        out - MarkupOutput where to write ouput.
        item - WebDisplayUnit instance containing info to be parsed.
        argument - String unique id for identifying given Radio button.
        isAnswerComplex - boolean true if answer is considered complex.
        Since:
        MicroStrategy Web 8.0.0
      • initializeCss

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

        public boolean isAnswerComplex()
        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)
        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 - object (PromptObject) to transform
        Returns:
        true if the data is a PromptObject of a Expression WebPrompt.
      • getDescription

        public java.lang.String getDescription()
        This transforms description
        Specified by:
        getDescription in interface Transform
        Returns:
        the description of a radio button answer.
      • shouldRenderNoneOption

        protected boolean shouldRenderNoneOption()
        Indicates whether or not 'None' option should be displayed. WebPrompt instance determine whether or not to displaye the 'none' option.
        Returns:
        boolean true if 'none' is to be displayed.
        Since:
        MicroStrategy Web 8.0.0