Class PromptsClassicTransform

  • All Implemented Interfaces:
    AppTransform, LayoutTransform, Transform
    Direct Known Subclasses:
    PromptsCreateReportTransform, PromptsIFrameTransform, PromptsSubscriptionTransform

    public class PromptsClassicTransform
    extends AbstractAppTransform
    implements LayoutTransform

    Title: PromptsClassicTransform

    Description: The PromptsClassicTransform is respinsible of creating a container where all of the Prompt's page components will be rendered. It defines areas to render in container and if layouts aren't used then transform itself divides the rendering of the prompts container into several methods responsible of rendering such Prompt content, Prompt summary, Prompt Index, Execution bar, Generic Error, etc. Also, it is responsible of propagating generic properties to all prompts to be rendered in Page.

    Company: Microstrategy, Inc.

    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Field Detail

      • _totalPrompts

        protected int _totalPrompts
        Indicates total of prompts defined in give prompted report.
      • STYLE_NAME_PROPERTY

        protected static final java.lang.String STYLE_NAME_PROPERTY
        Denotes constant for getting prompt's style name.
        See Also:
        Constant Field Values
      • DEFAULT_STYLE

        protected static final java.lang.String DEFAULT_STYLE
        Denotes constant for getting prompt's default style name.
        See Also:
        Constant Field Values
      • isDhtmlMode

        protected boolean isDhtmlMode
        Returns true if using DHTML. This values is initialized based on the getPromptsBean().getOutputFormat() method.
      • formID

        public FormalParameter formID
        Specifies the name and Id of the HTML form tag in report page.
        All prompts are part of one HTML form, which is submitted as request in order to be processed. This form has a unique name and id for indentifying it when prompt answers are processed. This value is also referenced from the Javascript files
        This flag is used as text value.
      • upperCornerImage

        public FormalParameter upperCornerImage
        Deprecated.
        The Image for the upper corner of the frame for multi-prompted reports.
        As of version 8.0, these formal parameters are not directly used by the application. They are still referenced by the renderPromptsContainer(MarkupOutput) method
      • _upperCornerImage

        protected java.lang.String _upperCornerImage
      • lowerCornerImage

        public FormalParameter lowerCornerImage
        Deprecated.
        The image for the lower corner of the frame for multi-prompted reports.
        As of version 8.0, these formal parameters are not directly used by the application. They are still referenced by the renderPromptsContainer(MarkupOutput) method
      • _lowerCornerImage

        protected java.lang.String _lowerCornerImage
      • indexListPostfixImage

        public FormalParameter indexListPostfixImage
        Deprecated.
        This formal parameter is not used anymore. Images can be changed using the css
        The name of each image on the Prompt's index must be its position and this postfix, i.e. 1 + "_white.gif".
      • indexContentPostfixImage

        public FormalParameter indexContentPostfixImage
        Deprecated.
        This formal parameter is not used anymore. Images can be changed using the css
        The name of each image on the Prompt's content must be its position and this postfix, i.e. 1 + "_white.gif".
      • previousIncFecthImage

        public FormalParameter previousIncFecthImage
        Deprecated.
        This formal parameter is not used anymore. Images can be changed using the css
        The name of the image for the previous block in incremental fetching.
      • nextIncFecthImage

        public FormalParameter nextIncFecthImage
        Deprecated.
        This formal parameter is not used anymore. Images can be changed using the css
        The name of the image for the next block in incremental fetching.
      • firstIncFecthImage

        public FormalParameter firstIncFecthImage
        Deprecated.
        This formal parameter is not used anymore. Images can be changed using the css
        The name of the image for the first block in incremental fetching.
      • lastIncFecthImage

        public FormalParameter lastIncFecthImage
        Deprecated.
        This formal parameter is not used anymore. Images can be changed using the css
        The name of the image for the last block in incremental fetching.
      • summaryImage

        public FormalParameter summaryImage
        Deprecated.
        This formal parameter is not used anymore. Images can be changed using the css
        The name of the image for displaying the summary item.
      • displayMode

        public FormalParameter displayMode
        Specifies how multiple prompts will be displayed in report layout.
        This only applies when there are multiple prompts defined in given report. Prompts can be shown all or, one by one.
        This flag is used as int value.
        Allowed Values:
          MODE_ALL = 1
        • MODE_ONE_BY_ONE = 2

      • MODE_ALL

        public static final int MODE_ALL
        Indicates that all prompts should be displayed in one page.
        See Also:
        Constant Field Values
      • MODE_ONE_BY_ONE

        public static final int MODE_ONE_BY_ONE
        Indicates that one prompt per page should be displayed.
        See Also:
        Constant Field Values
      • levelFlag

        public FormalParameter levelFlag
        Specifies what prompt region is displayed in report layout.
        In order to allow prompt customization, report layout is broken into 6 displayable prompt regions: Execute buttons, prompt index, prompt summary, prompt question, prompt position and generic error.
        This flag is used as bit-wise value.
        Allowed Values:
          LEVEL_SHOW_EXECUTE_BUTTONS = 0x001
        • LEVEL_SHOW_PROMPT_INDEX = 0x002
        • LEVEL_SHOW_PROMPT_SUMMARY = 0x004
        • LEVEL_SHOW_PROMPT_QUESTIONS = 0x008
        • LEVEL_SHOW_PROMPT_POSITION = 0x010
        • LEVEL_SHOW_GENERIC_ERROR = 0x020
        • LEVEL_SHOW_EXECUTE_BUTTONS_TOP = 0x040
        • LEVEL_SHOW_EXECUTE_BUTTONS_BOTTOM = 0x080
        • LEVEL_SHOW_SAVE_BUTTON = 0x100
        • LEVEL_SHOW_WARNING_HEADER_MSSG = 0x200
        • LEVEL_SHOW_ALL = 0xfff

        Default value is denoted by: EnumPromptLevelFlags.LEVEL_SHOW_ALL & ~ EnumPromptLevelFlags.LEVEL_SHOW_SAVE_BUTTON & ~ EnumPromptLevelFlags.LEVEL_SHOW_WARNING_HEADER_MSSG which indicates to display everything but 'Save' button and 'Warning Header Message' area.
        For complete list, refer to EnumPromptLevelFlags
      • promptQuestionLevelFlag

        public FormalParameter promptQuestionLevelFlag
        Specifies what sections are displayed in prompt question layout.
        In order to allow prompt customization, prompt question layout is broken into 4 displayable sections: Prompt title, prompt meaning, restriction, prompt content, prompt error and default answer. This value is propagated to corresponding prompt transform(s), meaning that will affect all prompts in a given report.
        This flag is used as bit-wise value.
        Allowed Values:
          LEVEL_SHOW_TITLE = 0x001
        • LEVEL_SHOW_MEANING = 0x002
        • LEVEL_SHOW_RESTRICTION = 0x004
        • LEVEL_SHOW_CONTENT = 0x008
        • LEVEL_SHOW_ERROR = 0x010
        • LEVEL_SHOW_DEFAULT_ANSWER = 0x020
        • LEVEL_SHOW_TITLE_BACKTOTOP = 0x040

        For complete list, refer to EnumPromptLevelFlags
      • showRequired

        public FormalParameter showRequired
        Specifies whether or not to show required message in prompt question title.
        Per default, all prompts defined as required, display a "Required" message at the end of the prompt title. This flag will overrule this layout requirement by not displaying this message even though prompt is required. This value is propagated to corresponding prompt transform(s), meaning that will affect all prompts in a given report.
        This flag is used as boolean value.
      • showRequiredFirst

        public FormalParameter showRequiredFirst
        Deprecated.
        because preferences are read from Preferences object itself, and FP isn't necessary.
        Specifies whether prompts defined as required will be rendered first or not.
        Applies only when prompts are displayed in one page. Prompts can be sorted by priority. Important: This FP is directly associated to a Project preference; this means that it can't be modified in StyleCatalog because it's a Transform property.
        This flag is used as boolean value.
      • showMatchCase

        public FormalParameter showMatchCase
        Deprecated.
        since preference value can be read by accessing getPreferenceValue() method
        Specifies whether a match case checkbox is displayed at the end of a given search form within prompt question.
        Not all prompt types support searching for elements or objects, so it could be ignored. A match case checkbox is normally displayed next to this search section. This value is propagated to corresponding prompt transform(s), meaning that will affect all prompts in a given report.
        This flag is used as boolean value.
      • blockCount

        public FormalParameter blockCount
        Specifies the number of prompts are displayed per block in report page.
        Only applies when there are multiple prompts defined in given report and when display mode is set to display all prompts in one page. It indicates the number of prompts per block being displayed in page.
        This flag is used as int value.
      • incrementalAttrElemBlockCount

        public FormalParameter incrementalAttrElemBlockCount
        Specifies the maximum number of attribute elements to be displayed in available list when incremental fetch is available.
        Only applies in Element prompts. Prompt styles, such as list and radio button, are governed by this flag, even though they don't provide any incremental fetch functionality. This value is ignored by other prompt types and it gets by a Web preference end-user can edit. This value is propagated to corresponding prompt transform(s), meaning that will affect all prompts in a given report.
        This flag is used as int value.
        For more detailed information, please refer to Web preferences documentation. See Project defaults/General section, at Incremental fetch preference: "Maximum number of report objects per block".
      • incrementalObjectsBlockCount

        public FormalParameter incrementalObjectsBlockCount
        Specifies the maximum number of objects (attributes, attribute forms and metrics) to be displayed in available list when incremental fetch is available.
        Only applies in Object and Expression prompts. Prompt styles, such as list and radio button, are governed by this flag, even though they don't provide any incremental fetch functionality. This value is ignored by other prompt types and it gets set by a Web preference end-user can edit. This value is propagated to corresponding prompt transform(s), meaning that will affect all prompts in a given report.
        This flag is used as int value.
        For more detailed information, please refer to Web preferences documentation. See Project defaults/General section, at Incremental fetch preference: "Maximum number of attributes per block".
      • exportReportLabel

        public FormalParameter exportReportLabel
        Deprecated.
        Instead, executeButtonLabel will be used.
        Specifies the ID of the descriptor to use on the button for continue with report processing.
        Default value is for displaying 'Execute Report'.
        This flag is used as string value.
      • exportDocumentLabel

        public FormalParameter exportDocumentLabel
        Deprecated.
        Instead, executeButtonLabel will be used.
        Specifies the ID of the descriptor to use on the button for continue with document processing.
        Default value is for displaying 'Execute Document'.
        This flag is used as string value.
      • executeButtonLabel

        public FormalParameter executeButtonLabel
        Specifies the ID of the descriptor to use on the button for continue with document processing. The id should be a valid ID in the Resources Bundle.
        The default value is empty, in which case the Transform will use a predetermined value (which might be different between reports and documents). The string value for the formal parameter takes the form mstrWeb.3649
        Since:
        MicroStrategy Web 8.0.0
      • showExecuteAtTop

        protected FormalParameter showExecuteAtTop
        Specifies whether or not to show an 'Execute' button at the top of the list of Prompts.
        This flag is used as int value. Possible values are defined in EnumPromptLevelFlags enumeration.
        Allowed Values:
          LEVEL_DISPLAY_ELEMENT_YES = 1
        • LEVEL_DISPLAY_ELEMENT_NO = 2
        • LEVEL_DISPLAY_ELEMENT_USE_DEFAULT = 3

        Since:
        MicroStrategy Web 7.5.0
      • showExecuteAtBottom

        protected FormalParameter showExecuteAtBottom
        Specifies whether or not to show an 'Execute' button at the bottom of the list of Prompts.
        This flag is used as int value. Possible values are defined in EnumPromptLevelFlags enumeration.
        Allowed Values:
          LEVEL_DISPLAY_ELEMENT_YES = 1
        • LEVEL_DISPLAY_ELEMENT_NO = 2
        • LEVEL_DISPLAY_ELEMENT_USE_DEFAULT = 3

        Since:
        MicroStrategy Web 7.5.0
      • multiplePromptCssFile

        public FormalParameter multiplePromptCssFile
        Specifies the css file to use if it's multiple prompt information that requires to be rendered.
        This css file will be used together with the one indicated on the cssFile formal parameter.
        Since:
        MicroStrategy Web 8.0.0
      • renderForm

        public FormalParameter renderForm
        Indicates wheteher the transform will render its own form
        Since:
        MicroStrategy Web 8.0.0
      • _1ptransImage

        protected java.lang.String _1ptransImage
        Constant indicating source path to a transparent image.
      • _imagesFolder

        protected java.lang.String _imagesFolder
        Constant indicating source path to a Folder image.
      • _firstPrompt

        protected PromptObject _firstPrompt
        Reference to first prompt in collection.
      • _lastPrompt

        protected PromptObject _lastPrompt
        Reference to last prompt in collection.
      • _nextBlockPrompt

        protected PromptObject _nextBlockPrompt
        Reference to next prompt in block.
        Instance used in Incremental fetch when prompts are displayed each one in different page.
      • _previousBlockPrompt

        protected PromptObject _previousBlockPrompt
        Reference to previous prompt in block.
        Instance used in Incremental fetch when prompts are displayed each one in different page.
      • _nextPrompt

        protected PromptObject _nextPrompt
        Reference to next prompt in collection of prompts.
      • _previousPrompt

        protected PromptObject _previousPrompt
        Reference to previous prompt in collection of prompts.
      • PROMPT_LOADED_ARG

        protected static final java.lang.String PROMPT_LOADED_ARG
        Constant denoting argument for prompt loaded first time.
        Since:
        MicroStrategy Web 7.5.4
        See Also:
        Constant Field Values
      • canCancelPrompt

        public FormalParameter canCancelPrompt
        Indicates whether the cancel prompt button is displayed
        Since:
        MicroStrategy Web 8.1.0
    • Constructor Detail

      • PromptsClassicTransform

        public PromptsClassicTransform()
        Default no-args constructor.
        Initialize all Formal Parameters.
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Returns description for this Transform.
        Specified by:
        getDescription in interface Transform
        Returns:
        "This is the Transform that renders Prompts in the Application."
      • renderMultiplePromptCssLink

        public void renderMultiplePromptCssLink​(MarkupOutput out)
        Renders a css file link corresponding to the file specified on the multiplePromptCssFile formal parameter.
        If applicable (multiple prompt being rendered), these CSS links will be generated.
        Parameters:
        out - MarkupOutput instance where to write the output of the method.
        Since:
        MicroStrategy Web 8.0.0
      • isForDefinition

        protected boolean isForDefinition()
        Since:
        MicroStrategy Web 9.0.0
      • renderPromptsNonLayoutContainer

        public void renderPromptsNonLayoutContainer​(MarkupOutput out)
                                             throws java.lang.IllegalArgumentException,
                                                    UnmodifiableException
        Renders prompts area that defines out-of-box Prompt's container layout.
        This function gets executed when not XML layout is defined for given Prompt container.
        Parameters:
        out - MarkupOutput where to write the output
        Throws:
        java.lang.IllegalArgumentException
        UnmodifiableException
        Since:
        MicroStrategy Web 8.0.1
      • getTotalOpenPrompts

        protected int getTotalOpenPrompts()
        Initializes property indicating total number of Open prompts in PromptsBean.
        Since:
        MicroStrategy Web 8.0.1
      • processPromptedMetricAdded

        protected void processPromptedMetricAdded​(MarkupOutput out)
                                           throws java.lang.IllegalStateException,
                                                  java.lang.IllegalArgumentException
        Process action from Report where user added a prompted metric to Filter.
        Event is generated within Executed report. Most likely, end-user added a metric associated with a prompt. This required to execute given prompt.
        Parameters:
        out - MarkupOutput where to write output
        Throws:
        java.lang.IllegalStateException - if any
        java.lang.IllegalArgumentException - if any.
        Since:
        MicroStrategy Web 8.0.1
      • renderGenericErrorMessage

        public void renderGenericErrorMessage​(MarkupOutput out)
        Renders generic error message.
        It'll display localized message 'Error in prompts'.
        Parameters:
        out - MarkupOutput where to write the message.
        Since:
        MicroStrategy Web 8.0.0
      • isBottomExecuteButtonViewable

        public boolean isBottomExecuteButtonViewable()
        Determines whether or not, top bottom buttons bar is viewable or not.
        Reads formal parameter "showExecuteAtBottom' that indicates to display this bar which has higher precedence over Level flag.
        This formal parameter might take following values:
        Allowed Values:
          LEVEL_DISPLAY_ELEMENT_YES = Indicates that manually display this bar.
        • LEVEL_DISPLAY_ELEMENT_NO = Indicates not to display the bar.
        • LEVEL_DISPLAY_ELEMENT_USE_DEFAULT = Indicates to determine whether or not to display bar based on default value.
        Returns:
        true if viewable.
        Since:
        MicroStrategy Web 8.0.0
      • isTopExecuteButtonViewable

        public boolean isTopExecuteButtonViewable()
        Determines whether or not, top execution buttons bar is viewable or not.
        Reads formal parameter "showExecuteAtTop' that indicates to display this bar which will be displayed only if there are more than 1 prompt displayed in page and Prompt summary isn't displayed either. This FP has higher precedence over Level flag.
        This formal parameter might take following values:
        Allowed Values:
          LEVEL_DISPLAY_ELEMENT_YES = Indicates that manually display this bar.
        • LEVEL_DISPLAY_ELEMENT_NO = Indicates not to display the bar.
        • LEVEL_DISPLAY_ELEMENT_USE_DEFAULT = Indicates to determine whether or not to display bar based on default value.
        Returns:
        true if viewable.
        Since:
        MicroStrategy Web 8.0.0
      • showPromptSummary

        public boolean showPromptSummary()
        Determines whether or not the Prompt Summary header should be visible.
        Reads from the levelFlag formal parameter to determine if it should be shown or not when Prompt page is in 'Summary' mode (see isPromptSummaryViewable() method's description.
        Returns:
        true if it is specified in Level flag as to be displayed.
        Since:
        MicroStrategy Web 8.0.0
      • isPromptSummaryViewable

        public boolean isPromptSummaryViewable()
        Indicates whether or not the Prompt container is Summary mode.
        Prompt summary page is rendered if user has requested it. This transform has a request property which indicates what mode Prompt container should be rendered like, either 'Summary' or 'Questions'.
        Returns:
        true if current prompt page is 'Summary' mode.
        Since:
        MicroStrategy Web 8.0.0
      • isPromptIndexViewable

        public boolean isPromptIndexViewable()
        Deprecated.
        Use isMultiplePrompt() method instead.
        Indicates whether or not prompt Index is viewable.
        Only condition to enble prompt Index is to have multiple prompts in current page.
        Returns:
        true if vieweable.
        Since:
        MicroStrategy Web 8.0.0
      • isMultiplePrompt

        public boolean isMultiplePrompt()
        Indicates whether or not given report is consisted of more than one prompt.
        Returns:
        true when collection of prompts exceeds more than one.
        Since:
        MicroStrategy Web 8.0.0
      • isPromptIndexAvailable

        public boolean isPromptIndexAvailable()
        Indicates whether or not 'Prompt index' section can be rendered.
        Uses Level flag to determine if this section is to be rendered.
        Returns:
        boolean true whether the prompt index section is viewable.
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptIndex

        public void renderPromptIndex​(MarkupOutput out,
                                      PromptObject prompt)
        Renders an individual prompt index.
        It generates an HTML anchor formatted with CSS classes.
        Parameters:
        out - MarkupOutput where to write prompt index.
        prompt - PromptObject index will point to this instance in Prompt's page.
        Since:
        MicroStrategy Web 8.0.0
      • setIncrementalFetchPrompts

        protected void setIncrementalFetchPrompts​(int index,
                                                  int blockInit,
                                                  int blockEnd,
                                                  int current,
                                                  PromptObject prompt)
        Specifies incremental fetch properties.
        Initializes transform's properties for first, next and last prompts.
        Parameters:
        index - prompt position
        blockInit - starting point in incremental fetch
        blockEnd - ending point in incremental fetch
        current - current prompt index
        prompt - prompt object instance
      • renderPromptsContainer

        public void renderPromptsContainer​(MarkupOutput out)
        Deprecated.
        Function not being used anymore. Instead, transformForRequestSuccessful(MarkupOutput) is invoked.
        Renders prompts area that defines main Prompt's container layout.
        Parameters:
        out - MarkupOutput where to write the output
        Since:
        MicroStrategy Web 7.5.1
      • renderPromptsContent

        public void renderPromptsContent​(MarkupOutput out)
        Renders content for area designated to show all Prompt questions.
        It will iterate prompt list and will render each one of them by calling renderPrompt(MarkupOutput, PromptObject) method.
        Parameters:
        out - MarkupOutput instance where to write Prompt questions.
      • isDhtmlMode

        public boolean isDhtmlMode()
        Determines whether or not DHTML mode is on.
        Returns:
        boolean true if DHTML is on.
        Since:
        MicroStrategy Web 8.0.0
      • getCurrentIndex

        protected int getCurrentIndex()
        Determines current prompt index.
        It takes current prompt object and by parsing collection of prompts, it determines corresponding index.
        Returns:
        int index
        Since:
        MicroStrategy Web 7.5.4
      • getBlockInit

        protected int getBlockInit()
        Determines block initial index.
        If prompts are displayed in one page and prompts collection doesn't exceed block count, then 0 is returned.
        Returns:
        int current init index for given block.
        Since:
        MicroStrategy Web 8.0.0
      • getBlockEnd

        protected int getBlockEnd()
        Indicates block ending index.
        If prompts are displayed in one page and prompts collection doesn't exceed block count, then size of block is returned.
        Returns:
        int ending index.
        Since:
        MicroStrategy Web 8.0.0
      • getPromptsListForIndexSection

        public java.util.ArrayList getPromptsListForIndexSection()
        Returns list of prompts determined by block count settings.
        Returns:
        ArrayList collection of prompts.
        Since:
        MicroStrategy Web 8.0.0
      • getPromptsList

        public java.util.ArrayList getPromptsList()
        Returns current list of prompts.
        Returns:
        an ArrayList instance with all the different prompts that should be rendered. Layout files use this funtion to loop through a collection of prompts.
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptNumber

        public void renderPromptNumber​(MarkupOutput out,
                                       PromptObject prompt)
        Renders the prompt number which is displayed along each prompt question.
        Parameters:
        out - MarkupOutput where the contents to render will be rendered.
        prompt - PromptObject current prompt being rendered.
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptNumber

        public void renderPromptNumber​(MarkupOutput out,
                                       int index)
        Renders Prompt number based on given index.
        Parameters:
        out - MarkupOutput where the contents to be rendered.
        index - integer with the index of the prompt being displayed.
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptAnchor

        public void renderPromptAnchor​(MarkupOutput out,
                                       PromptObject prompt)
        Renders an anchor for each prompt so it is easily accessible from the Summary Section.
        Parameters:
        out - MarkupOutput where the contents to be rendered.
        prompt - PromptObject current prompt being rendered.
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptAnchor

        public void renderPromptAnchor​(MarkupOutput out,
                                       int index)
        Renders an individual prompt anchor using the specified index.
        Parameters:
        out - MarkupOutput where the contents to be rendered.
        index - integer with the index of the prompt being displayed.
        Since:
        MicroStrategy Web 8.0.0
      • isPromptQuestionsAvailable

        public boolean isPromptQuestionsAvailable()
        Indicates whether or not prompt questions are enabled.
        It checkes level flag to see if EnumPromptLevelFlags.LEVEL_SHOW_PROMPT_QUESTIONS is enabled.
        Returns:
        whether the prompt question section is accessible
        Since:
        MicroStrategy Web 8.0.0
      • renderCalendar

        public void renderCalendar​(MarkupOutput out)
        Renders Calendar component.
        It only generates minimal HTML and JS code necessary for toggling Calendar component in current Prompt's page.
        Parameters:
        out - MarkupOutput where the contents to be rendered.
        Since:
        MicroStrategy Web 8.0.0
      • displayPromptOneByOne

        public boolean displayPromptOneByOne()
        Indicates whether or not to display prompts one by one.
        Returns:
        true when only one prompt is to be displayed in a page.
        Since:
        MicroStrategy Web 8.0.0
      • getPromptsListOneByOne

        public java.util.ArrayList getPromptsListOneByOne()
        Returns list of prompts sorted by 'one by one' mode.
        Returns:
        the elements to be displayed when the "Each on a separate page" preference is selected.
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptsSummary

        public void renderPromptsSummary​(MarkupOutput out)
        Renders Prompt's container in Summary mode.
        All prompt answers are summarize in this method. No prompt question gets rendered.
        Parameters:
        out - MarkupOutput where the contents to render will be rendered.
      • getPromptsListForSummary

        public java.util.ArrayList getPromptsListForSummary()
        Returns list of prompts to be displayed in Summary mode.
        Returns:
        an ArrayList instance initialized with the prompt information to use for the summary display.
        Since:
        MicroStrategy Web 8.0.0
      • renderWarnigHeaderMessage

        public void renderWarnigHeaderMessage​(MarkupOutput out)
        Deprecated.
        use renderWarningHeaderMessage instead.
        Renders any warning mesage before rendering prompts forms and prompt index.
        This warning message is
        Parameters:
        out - MarkupOutput where the contents to render will be saved
      • renderWarningHeaderMessage

        public void renderWarningHeaderMessage​(MarkupOutput out)
        Renders any warning mesage before rendering prompts forms and prompt index.
        This warning message is available in current prompt definition.
        Parameters:
        out - MarkupOutput where the contents to render will be saved
        Since:
        MicroStrategy Web 8.0.0
      • renderFormContent

        public void renderFormContent​(MarkupOutput out)
        Renders any mesage before rendering prompts forms and prompt index.
        Parameters:
        out - MarkupOutput where the contents to render will be saved
        Since:
        MicroStrategy Web 8.0.0
      • renderPrompt

        public void renderPrompt​(MarkupOutput out,
                                 PromptObject prompt)
        Renders content for a single prompt object.
        Wrapper method which invokes method renderPrompt that takes an extra parameter denoting styleName. It passes 'null' value for this parameter which forces renderPrompt method to use prompt's designated style.
        Parameters:
        out - MarkupOutput where the contents to render will be saved
        prompt - the PromptObject instance of the prompt information to display
        Since:
        MicroStrategy Web 8.0.0
      • renderPrompt

        public void renderPrompt​(MarkupOutput out,
                                 PromptObject prompt,
                                 java.lang.String styleName)
        Renders content for a single prompt object by applying given Style.
        Based on the xsl name, this method gets a TransformInstance from the style catalog and calls the transform method of that transform. The Transform returned by the style catalog should be an instance of WebPromptTransform. If styleName is empty or null, then prompt's default style (defined in StyleCatalog.xml) gets used.
        Parameters:
        out - MarkupOutput where the contents to render will be saved
        prompt - PromptObject instance for the prompt to display
        styleName - the name of the style to be used for a particular prompt
        Since:
        MicroStrategy Web 8.0.0
      • getPromptTransformByStyle

        protected Transform getPromptTransformByStyle​(java.lang.String style)
                                               throws java.lang.IllegalArgumentException,
                                                      WebTransformException
        Indicates corresponding prompt question transform associated to given style name.
        It will return prompt transform defined in StyleCatalog.
        Parameters:
        style - String
        Returns:
        Transform null if not found in styleCatalog.xml
        Throws:
        java.lang.IllegalArgumentException
        WebTransformException
        Since:
        MicroStrategy Web 8.0.1
      • initializePromptQuestionProperties

        protected void initializePromptQuestionProperties​(int promptPosition,
                                                          Transform promptTransform)
        Initializes given prompt transform properties before transform given prompt object.
        All generic properties that Container needs to inform to each prompt object are specified in this function.
        Parameters:
        promptPosition -
        promptTransform - Transform
        Since:
        MicroStrategy Web 8.0.1
      • renderPrompt

        public void renderPrompt​(MarkupOutput out,
                                 int index)
        Renders content for a single prompt object denoted by given index.
        It parses prompts collection and if an instance of PromptObject is defined at given index, then method renderPrompt(MarkupOutput, PromptObject) is invoked.
        Parameters:
        out - MarkupOutput where the contents to render will be saved
        index - integer number indicating which prompt should be displayed.
        Since:
        MicroStrategy Web 8.0.0
      • getDecimalSeparator

        protected java.lang.String getDecimalSeparator()
        Indicates current decimal separator for active Locale.
        Returns:
        String decimal separator.
        Since:
        MicroStrategy Web 7.5.4
      • renderExecuteBar

        public void renderExecuteBar​(MarkupOutput out)
        Renders Prompt's execution bar.
        This function will be responsible of rendering if neccessary, those prompt navigation buttons.
        These navigations buttons are consisted of the following:
        • 'Back to Prompt' - displayed only when summary mode is displayed.
        • 'Previous' - Displayed only when prompts are displayed in separate pages and there are more than 1 prompt defined.
        • 'Next' - Displayed only when prompts are displayed in separate pages and there are more than 1 prompt defined.
        Finally, this function will invoke function renderExecuteButtons(MarkupOutput). This function will render remaining buttons that complement this execution bar.
        Parameters:
        out - MarkupOutput where to write the output of the method.
      • renderPromptIncrementalFetchButtons

        public void renderPromptIncrementalFetchButtons​(MarkupOutput out)
        Renders Incremental fetch buttons for paginating Prompts being displayed each one in different page.
        Parameters:
        out - MarkupOutput where to write the output of the method.
        Since:
        MicroStrategy Web 8.0.1
      • renderExecuteButtons

        public void renderExecuteButtons​(MarkupOutput out)
        Renders execution buttons for processing Prompts.
        This buttons are different to those for navigation in terms of functionality. Pretty much, these buttons are used for executing and canceling prompts. Buttons displayed are for 'Execute Report' or 'Execute Document', 'Save' and 'Cancel'.
        Parameters:
        out - MarkupOutput where to write the output of the method.
      • canDisplaySaveButton

        public boolean canDisplaySaveButton()
        Indicates whether or not 'Save' button can be displayed.
        Level flag is checked in order to determine this condition.
        Returns:
        boolean true if it is displayed.
        Since:
        MicroStrategy Web 8.0.1
      • canSavePrompt

        protected boolean canSavePrompt()
        Indicates whether or not end-user is enabled to save given Prompted Report.
        Useful to determine whether or not to displaye 'Save' button in Prompt page.
        Returns:
        true if user has proper permissions.
        Since:
        MicroStrategy Web 8.0.0
      • canCancelPrompt

        protected boolean canCancelPrompt()
        Deprecated.
        The isRWDatasetAdded formal parameter has been removed so this method is no longer called.
        Indicates whether or not given prompted report can be cancelled.
        A prompted report can be cancelled by end-user if re-prompt is enabled or it isn't a dataset being added to a RW document.
        Returns:
        true if cancelling prompted report is enabled.
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptSummaryIndexSection

        public void renderPromptSummaryIndexSection​(MarkupOutput out)
        Renders 'Prompts summary' toggle area.
        Generates display output that denotes an HTML anchor and label to allow end-users to toggle between 'Summary' and 'Questions' prompt's page mode.
        Parameters:
        out - where to write the output of the method.
      • renderIncrementalFetch

        public void renderIncrementalFetch​(int blockInit,
                                           int iblockCount,
                                           MarkupOutput out)
        Deprecated.
        call renderFirstPreviousIncrementalFetch and renderNextLastIncrementalFetch methods instead.
        Renders incremental fetch section.
        Incremental section where First, Previous, Next and Last incremental fetch buttons are organized. It invokes corresponding render methods.
        Parameters:
        blockInit - starting point in incremental fetch
        iblockCount - page size
        out - where to write the output of the method.
      • renderIncrementalFetchImage

        public void renderIncrementalFetchImage​(MarkupOutput out,
                                                java.lang.String cssClass,
                                                java.lang.String name,
                                                java.lang.String title)
        Renders image for incremental fetch feature.
        It is specified CSS, argument name and title.
        Parameters:
        out - MarkupOutput where to write image.
        cssClass - String CSS class associated to image.
        name - String unique id for image.
        title - String Label to be displayed along with image.
        Since:
        MicroStrategy Web 8.0.0
      • renderFirstPreviousIncrementalFetch

        public void renderFirstPreviousIncrementalFetch​(MarkupOutput out)
        Renders the first/previous incremental fetch buttons.
        It determines values for blockEnd and blockInit which are passed as parameters when invoking method renderFirstPreviousIncrementalFetch(MarkupOutput, int, int). These values are calculated by this transform.
        Parameters:
        out - MarkupOutput instance where to write the output of the method.
        Since:
        MicroStrategy Web 8.0.0
      • renderFirstPreviousIncrementalFetch

        public void renderFirstPreviousIncrementalFetch​(MarkupOutput out,
                                                        int blockInit,
                                                        int iblockCount)
        Renders the first/previous incremental fetch buttons.
        Parameters:
        out - MarkupOutput instance where to write the output of the method.
        blockInit - int value pointing to initial index of current block.
        iblockCount - int size of current block.
        Since:
        MicroStrategy Web 8.0.0
      • renderNextLastIncrementalFetch

        public void renderNextLastIncrementalFetch​(MarkupOutput out)
        Renders the next/last incremental fetch buttons.
        It determines values for blockEnd and blockInit which are passed as parameters when invoking method renderNextLastIncrementalFetch(MarkupOutput, int, int). These values are calculated by this transform.
        Parameters:
        out - MarkupOutput instance where to write the output of the method.
        Since:
        MicroStrategy Web 8.0.0
      • renderNextLastIncrementalFetch

        public void renderNextLastIncrementalFetch​(MarkupOutput out,
                                                   int blockInit,
                                                   int iblockCount)
        Renders the next/last incremental fetch buttons.
        Parameters:
        out - MarkupOutput instance where to write the output of the method.
        blockInit - next index
        iblockCount - last index
        Since:
        MicroStrategy Web 8.0.0
      • renderJavaScriptHeader

        public void renderJavaScriptHeader​(MarkupOutput out)
        Renders javascript variables on top of the page to be used in DHTML mode.
        Parameters:
        out - where to write the output of the method.
      • renderJavaScriptFooter

        public void renderJavaScriptFooter​(MarkupOutput out)
        Renders javascript variables at the bottom of the page to be used in DHTML mode.
        Parameters:
        out - where to write the output of the method.
      • getAnchorPinFromRequest

        protected java.lang.String getAnchorPinFromRequest()
        Indicates prompt position based on GUI action.
        There are actions specific to GUI and not to Prompt's events such as switching from 'Qualify' to 'Select' in Hierarchical prompts. For such cases, prompt position remains the last one which couldn't be the prompt being edited.
        This function will get prompt position being edited from request by looking up any of the GUI specific actions.
        Returns:
        String prompt position.
        Since:
        MicroStrategy Web 7.5.4
      • renderFormStart

        public void renderFormStart​(MarkupOutput out)
        Renders opening HTML tag for Prompt's form.
        In DHTML mode it adds an onSubmit event to the FORM tag, to call BuildUserSelections(n), where n is the number of prompts.
        This method also renders the hidden inputs associated with the event.
        Parameters:
        out - where to write the output of the method.
      • isMultipartRequestEnabled

        protected boolean isMultipartRequestEnabled()
        Indicates whether or not to enable Multipart request as encode type content.
        Returns:
        boolean true if there's a prompt whose style requires uploading functionality.
        Since:
        MicroStrategy Web 7.5.0
      • renderFormEnd

        public void renderFormEnd​(MarkupOutput out)
        Renders closing HTML tag.
        This function is overwritten and adds an extra event for Saving Answer.
        Parameters:
        out - where to write the output of the method.
      • renderRootFolderBrowserHiddenValue

        public void renderRootFolderBrowserHiddenValue​(MarkupOutput out)
        Renders hidden input values for all hierarchical prompts specifying a folder Id.
        Parameters:
        out - MarkupOutput where to write output.
        Since:
        MicroStrategy Web 7.5.1
      • generateIndexLink

        public AnchorTag generateIndexLink​(PromptObject prompt)
        Creates a AnchorTag object (URL link) for invoking JS 'BuildUserSelections' method.
        Parameters:
        prompt - PromptObject prompt object being parsed.
        Returns:
        AnchorTag instance.
        Since:
        MicroStrategy Web 8.0.0
      • renderIndexLinkStart

        public void renderIndexLinkStart​(int index,
                                         PromptObject prompt,
                                         MarkupOutput out)
        Deprecated.
        use generateIndexLink instead
        Renders an opening HTML tag for an anchor pointing to given Prompt.
        Parameters:
        out - where to write the output of the method.
        prompt - the Prompt object to render the link of
        index - the index associated with the prompt
      • renderIndexImage

        public void renderIndexImage​(int index,
                                     java.lang.String postFix,
                                     PromptObject prompt,
                                     MarkupOutput out)
        Deprecated.
        This method cannot be used in a layout-xml and it's not used by the application anymore. It will be removed in future versions of the product.
        Renders an HTML image TAG for the Prompts Index.
        Parameters:
        out - MarkupOutput where to write the output of the method.
        prompt - PromptObject the Prompt object to render the link of
        index - int the index associated with the prompt, this is the index used to render the image.
        postFix - String text indicating extra arguments.
      • renderTitleImage

        public void renderTitleImage​(int index,
                                     java.lang.String postFix,
                                     PromptObject prompt,
                                     MarkupOutput out)
        Deprecated.
        This method cannot be used in a layout-xml and it's not used by the application anymore. It will be removed in future versions of the product.
        Renders an HTML image TAG for the Prompts Index.
        Parameters:
        out - where to write the output of the method.
        prompt - the Prompt object to render the link of
        index - the index associated with the prompt, this is the index used to render the image.
        postFix - String indicating extra arguments.
      • renderIndexLinkEnd

        public void renderIndexLinkEnd​(int index,
                                       PromptObject prompt,
                                       MarkupOutput out)
        Deprecated.
        use generateIndexLink instead
        Renders a closing HTML tag for an anchor pointing to given Prompt.
        Render the start of the A tag (Link) for the Prompts Index.
        Parameters:
        out - where to write the output of the method.
        prompt - the Prompt object to render the link of
        index - the index associated with the prompt
      • renderLabel

        public void renderLabel​(MarkupOutput out,
                                int descriptorId,
                                java.lang.String forValue)
        Renders HTML label around localized message denoted by given descriptor ID.
        Parameters:
        out - MarkupOutput instance where to write the output of the method.
        descriptorId - int descriptor id
        forValue - String HTML attribute indicating which HTML object is associated to.
        Since:
        MicroStrategy Web 8.0.0
      • renderLabel

        public void renderLabel​(MarkupOutput out,
                                java.lang.String labelName,
                                java.lang.String forValue)
        Renders HTML label around given text.
        Parameters:
        out - MarkupOutput instance where to write the output of the method.
        labelName - String label text.
        forValue - String HTML attribute indicating which HTML object is associated to.
        Since:
        MicroStrategy Web 8.0.0
      • getStyleName

        protected java.lang.String getStyleName​(PromptObject prompt)
        Determines style name associated to given prompt object.
        It searchs for a prompt's displayProperty called STYLE_NAME_PROPERTY. This property corresponds to the name of the xsl set in Microstrategy Desktop. If found the name of the file (without the extension) is returned.
        If not found, it calls getDefaultStyleName and return the Default style name.
        Parameters:
        prompt - the prompt to transform
        Returns:
        the name of the style to use to transform the Prompt
      • getDefaultStyleName

        protected java.lang.String getDefaultStyleName​(PromptObject prompt)
        Return the DefaultStyle names to use to render a prompt. This correspond to the same default values used in Microstrategy 7i.
        Parameters:
        prompt - the prompt for which to get it's style
        Returns:
        the default style for the propmt depending on it's prompt type
      • renderImage

        public void renderImage​(java.lang.String image,
                                MarkupOutput out)
        Deprecated.
        This method cannot be used in a layout-xml. Instead, use renderImage(MarkupOutput out, String image)
        Renders an HTML image tag.
        Parameters:
        out - where to write the output of the method.
        image - the image soruce name.
      • renderImage

        public void renderImage​(MarkupOutput out,
                                java.lang.String image)
        Renders an HTML image tag.
        Overrides:
        renderImage in class AbstractAppTransform
        Parameters:
        out - where to write the output of the method.
        image - the image soruce name.
        Since:
        MicroStrategy Web 8.0.1
      • promptsLoadedFirstTime

        protected boolean promptsLoadedFirstTime()
        Indicates whether or not, prompts are loaded for the first time. It looks for any 'prompt' hidden value in request indicating there was a prompt request to be processed. This means, user has started editing any prompt in report.
        Returns:
        boolean true if there's no prompt request values.
        Since:
        MicroStrategy Web 7.5.3
      • getPromptDisplayPosition

        protected int getPromptDisplayPosition​(PromptObject prompt)
        Indicates prompt's display position.
        The display position is different from the PromptPosition. This function properly calculates this value.
        Parameters:
        prompt - Prompt object instance
        Returns:
        current prompt position
      • isReprompted

        public boolean isReprompted()
        Retrieves the value 'isReprompted' from the WebResultSetInstance This allows us to read the reprompt propery from an SDK object rather than passing a property in the request.
        Returns:
        boolean
        Since:
        MicroStrategy Web 8.0.1
      • initializeImages

        public void initializeImages()
        Initializes images to be used by this transform.
        Parent method gets invoked so all shared images get initialized as well.
        Overrides:
        initializeImages in class AbstractAppTransform
      • getNavigationArgument

        protected java.lang.String getNavigationArgument​(int position)
        Returns argument name for indicating prompt's navigation.
        When showing prompts one by one, the name of the argument to navigate through prompts is special, it's always the name of the argument _ the position you want
        Parameters:
        position - the position you want to travel to
        Returns:
        arg_position
      • getPromptsAppContext

        protected AppContext getPromptsAppContext()
        Returns instance of AppContext.
        AppContext instance is derived from existing Prompt's bean context.
        Returns:
        instance of AppContext
      • getAnswerEvent

        protected WebEvent getAnswerEvent()
        Returns Prompt's answer event.
        Returns:
        WebEvent instance for Answer
      • getCancelEvent

        protected WebEvent getCancelEvent()
        Returns Prompt's cancel event.
        This event will be determined based on parent Bean type. Cancel event will be obtained from either a DocumentBean or RWBean or ReportBean instance.
        Cancel event will be either one for canceling Re-prompting or regular Prompted execution.
        Overrides:
        getCancelEvent in class AbstractAppTransform
        Returns:
        WebEvent for cancel event.
      • getIsDatasetAddedArgumentName

        protected java.lang.String getIsDatasetAddedArgumentName()
        Indicates Argument name for specifying whether or not 'Adding Dataset' functionality was executed.
        Returns:
        String argument found in request.
        Since:
        MicroStrategy Web 8.0.0
      • getRePromptArgumentName

        protected java.lang.String getRePromptArgumentName()
        Returns the argument name for reprompt action.
        Returns:
        String argument name for reprompt
        Since:
        MicroStrategy Web 7.5.2
      • checkLevel

        protected boolean checkLevel​(int iLevelConst)
        Indicates if the level parameter value contains this flag.
        Parameters:
        iLevelConst - level flag
        Returns:
        true means the level flag is included in the level parameter value
      • isTreeRequest

        protected boolean isTreeRequest()
        Indicates if the request is an action performed in the hierarchical tree prompt.
        Returns:
        true if request is an action performed in the hierarchical tree prompt.
        Since:
        MicroStrategy Web 7.5.0
      • isAddDatasetInRequest

        protected boolean isAddDatasetInRequest()
        Indicates if in the request is an 'Add dataset' request.
        Likely, this prompt was induced by adding a prompted dataset in a running RW document.
        Returns:
        true if request is an action performed in the hierarchical tree prompt.
        Since:
        MicroStrategy Web 8.0.0
      • getSaveEvent

        protected WebEvent getSaveEvent()
        Returns an event for saving prompted report or RWD or HTML document.
        Returns:
        WebEvent where to write the output of the method.
        Since:
        MicroStrategy Web 7.5.1
      • getExecuteButtonLabel

        public java.lang.String getExecuteButtonLabel()
        Specifies label to be displayed in 'Execute' button.
        By default there are two possible labels: 'Run Report' or 'Run Document', based on the PromptsBean parent bean type.
        However, the label to use can be controlled through the executeButtonLabel formal parameter. If a value has been specified, this method will return the corresponding string from the Resources-Bundle.
        Returns:
        String localized message.
        Since:
        MicroStrategy Web 7.5.1
      • generateAnchor

        protected AnchorTag generateAnchor​(WebEvent event)
        Generates an AnchorTag from given event instance.
        Overwrites the parent method by setting special attributes if the event is not provided
        Overrides:
        generateAnchor in class AbstractAppTransform
        Parameters:
        event - WebEvent instance from where the anchor will be constructed
        Returns:
        AnchorTag initialized instance with the information as provided
        Since:
        MicroStrategy Web 8.0.0
      • isExecuteSectionAvailable

        public boolean isExecuteSectionAvailable()
        Indicates whether or not 'Execute' section is viewable.
        Checks the level flags to find out whether or not the execute buttons should be displayed.
        Returns:
        boolean true if viewable.
        Since:
        MicroStrategy Web 8.0.0
      • renderPromptSummaryButton

        public void renderPromptSummaryButton​(MarkupOutput out)
        Renders Prompt's 'Back to Prompts' button in Summary mode(if available).
        Parameters:
        out - MarkupOutput where to write output.
        Since:
        MicroStrategy Web 8.0.0
      • isOneByOneDisplayMode

        public boolean isOneByOneDisplayMode()
        Indicates whether or not prompts should be rendered on the same page.
        Returns:
        boolean true indicating all prompts are to be rendered in same page.
        Since:
        MicroStrategy Web 8.0.0
      • getCurrentPromptDisplayPosition

        protected int getCurrentPromptDisplayPosition()
        Returns current prompt's display position.
        Returns:
        int current prompt's position.
        Since:
        MicroStrategy Web 8.0.0
      • renderPreviousButton

        public void renderPreviousButton​(MarkupOutput out)
        Renders the 'Previous' button on the prompt page.
        Available only when 'one prompt per page' is rendered.
        Parameters:
        out - MarkupOutput where to write output.
        Since:
        MicroStrategy Web 8.0.0
      • renderNextButton

        public void renderNextButton​(MarkupOutput out)
        Renders the 'Next' button on the prompt page.
        Available only when 'one prompt per page' is rendered.
        Parameters:
        out - MarkupOutput where to write output.
        Since:
        MicroStrategy Web 8.0.0
      • renderExecuteButton

        public void renderExecuteButton​(MarkupOutput out)
        Renders the 'Execute' button on the prompt page.
        Parameters:
        out - MarkupOutput where to write output.
        Since:
        MicroStrategy Web 8.0.0
      • renderSaveButton

        public void renderSaveButton​(MarkupOutput out)
        Renders the Save button (if available).
        Parameters:
        out - MarkupOutput where to write output.
        Since:
        MicroStrategy Web 8.0.0
      • getSaveButtonLabel

        public java.lang.String getSaveButtonLabel()
        Since:
        MicroStrategy Web 9.0.0
      • renderCancelButton

        public void renderCancelButton​(MarkupOutput out)
        Renders the 'cancel' button on the prompt page.
        Overrides:
        renderCancelButton in class AbstractAppTransform
        Parameters:
        out - MarkupOutput where to write output.
        Since:
        MicroStrategy Web 8.0.0
      • isItemKeptInCartAvailable

        public boolean isItemKeptInCartAvailable()
        Indicates property value for whether or not selected item in cart's 'From' list should be removed.
        Value is read from Preference object.
        Returns:
        boolean, true if item is to be removed.
        Since:
        MicroStrategy Web 8.0.1
      • isMatchCaseShown

        public boolean isMatchCaseShown()
        Indicates property value for whether or not match case should be shown.
        Value is read from Preference object.
        Returns:
        boolean, true if match case is to be shown.
        Since:
        MicroStrategy Web 8.0.1
      • areRequiredPromptsShownFirst

        protected boolean areRequiredPromptsShownFirst()
        Initializes property indicating whether or not Required prompts are displayed first.
        Value is read from Preference object.
        Since:
        MicroStrategy Web 8.0.1
      • shouldDisplayRenameMessage

        public boolean shouldDisplayRenameMessage()
        Since:
        MicroStrategy Web 9.0.0
      • renderRenameMessage

        public void renderRenameMessage​(MarkupOutput out)
        Since:
        MicroStrategy Web 9.0.0
      • getRenameMessageLabel

        protected java.lang.String getRenameMessageLabel()
        Since:
        MicroStrategy Web 9.0.0