Class PromptHierarchicalTreeXHTMLTransform

  • All Implemented Interfaces:
    EnumPromptsBeanEvents, LayoutTransform, Transform

    public class PromptHierarchicalTreeXHTMLTransform
    extends PromptHierarchicalCartXHTMLTransform
    Renders hierarchical prompt in "tree" style, with the attribute populated dynamically using javascript, as the user expands in nodes.
    The output of this Transform generates well-formed XHTML, supports layout-xml, and it's designed to use external css files for all formatting.
    Since:
    MicroStrategy Web 8.0.0
    • Field Detail

      • _treeList

        protected java.util.Vector _treeList
      • hierarchyImage

        public FormalParameter hierarchyImage
        Image used to represent a hierarchy.
      • _hierarchyImage

        protected java.lang.String _hierarchyImage
      • folderImage

        public FormalParameter folderImage
        Image used to represent a folder.
      • _folderImage

        protected java.lang.String _folderImage
      • attributeImage

        public FormalParameter attributeImage
        Image used to represent an attribute.
      • _attributeImage

        protected java.lang.String _attributeImage
      • elementImage

        public FormalParameter elementImage
        Image used to represent an attribute element.
      • _elementImage

        protected java.lang.String _elementImage
      • attributeLockedImage

        public FormalParameter attributeLockedImage
        Image used to represent a locked attribute.
      • _attributeLockedImage

        protected java.lang.String _attributeLockedImage
      • folderItemsInTree

        public FormalParameter folderItemsInTree
        Specifies whether folder items should be displayed or not.
      • hierarchiesInTree

        public FormalParameter hierarchiesInTree
        Specifies whether the hierarchies will be displayed inside the tree.
      • searchSize

        public FormalParameter searchSize
        Specifies the size of the search text box.
      • treeStyle

        public FormalParameter treeStyle
        Class to indicate the style to use when displaying the tree.
    • Constructor Detail

      • PromptHierarchicalTreeXHTMLTransform

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

      • isSearchVisible

        public boolean isSearchVisible()
        Indicates if the search information and options will remain visible for this cart's display.
        This is depending if the property has been assigned to the CartExpression instance for this transform.
        Overrides:
        isSearchVisible in class PromptHierarchicalCartXHTMLTransform
        Returns:
        boolean True if the search information should be included on the HTML output for the user.
      • isHierarchyInformationVisible

        public boolean isHierarchyInformationVisible()
        Indicates if the hiearchy information will remain visible for this cart's display.
        It depends if there is information to render.
        Overrides:
        isHierarchyInformationVisible in class PromptHierarchicalCartXHTMLTransform
        Returns:
        boolean True if the hierarchy information should be included on the HTML output for the user.
      • isButtonTabControlVisible

        public boolean isButtonTabControlVisible()
        Indicates if the tab control buttons (for allowing users to switch from Select to Qualify) will be visible for this cart's display.
        It depends if trees are supported or not.
        Overrides:
        isButtonTabControlVisible in class PromptHierarchicalCartXHTMLTransform
        Returns:
        boolean True if the button tab control information should be included on the HTML output for the user.
      • isAttributeInformationVisible

        public boolean isAttributeInformationVisible()
        Indicates if the attribute information will remain visible for this cart's display, depending if trees are supported or not.
        Overrides:
        isAttributeInformationVisible in class PromptHierarchicalCartXHTMLTransform
        Returns:
        boolean True if the attribute information should be included on the HTML output for the user.
      • isTreeSupported

        public boolean isTreeSupported()
        Utility method that determines if trees are supported or not for the prompt display.
        Returns:
        True if the output mode is DHTML and the browser used is of version 6.0 or greater. Returns False otherwise.
      • getPromptEvent

        protected WebEvent getPromptEvent​(int eventId)
        Obtains an instance of WebEvent according to the event identifier indicated.
        Parameters:
        eventId - int value with the identifier of the event to obtain
        Returns:
        WebEvent a WebEvent instance for the event identifier specified.
      • getResourcesFolder

        public java.lang.String getResourcesFolder​(java.lang.String folderType)
        Maps the AppContext's getResourceFolder method.
        It validates that the getBeanContext is indeed an AppContext instance.
        Parameters:
        folderType - the folder type to look for
        Returns:
        AppContext's getResourceFolder result, or an empty string if it could not be obtained.
      • createTreeCartExpression

        protected TreeCartExpression createTreeCartExpression()
        Create a new CartExpression using the GUIElement Factory
        Returns:
        a new instance of the CartExpression
        Since:
        MicroStrategy Web 8.0.1
      • renderTreeJavaScript

        public void renderTreeJavaScript​(MarkupOutput out)
        Renders the JavaScript required for the tree control to behave correctly on user's browser.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderTreeStyle

        public void renderTreeStyle​(MarkupOutput out)
        Renders HTML for adding the stylesheet required for the prompt display to show correctly on the client's browser.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderCart

        public void renderCart​(MarkupOutput out)
        Renders a hierarchical shopping cart output by calling different methods that will render the individual sections of the prompt layout.
        The output is organized with a series of DIV HTML tags created. It overwrites the parent's renderCart method by adding the renderTreeStyle(MarkupOutput) and renderTreeJavaScript method calls.
        The methods used for the cart output are listed below, where out is a MarkupOutput instance where the HTML generated by these calls is saved.
        Overrides:
        renderCart in class PromptHierarchicalCartXHTMLTransform
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderParentCart

        public void renderParentCart​(MarkupOutput out)
        Wraps parent renderCart method.
        It only renders cart layout as defined in non-tree Hierarchical prompt. Function useful in Layouts infrastructure where parent behavior or layout can be displayed.
        Parameters:
        out - MarkupOutput where to write Prompt output.
      • renderParentContent

        public void renderParentContent​(MarkupOutput out)
        Wraps parent renderCart method.
        Similar to renderParentCart method but FP hierarchiesInTree gets reset to False, indicating that the entire Tree prompt transform will adopt parent's layout to look and act as a non-tree hierarchical prompt.
        Function useful in Layouts infrastructure where parent behavior or layout can be displayed.
        Parameters:
        out - MarkupOutput where Parent prompt will write its ouput.
      • isNodeComplex

        protected boolean isNodeComplex​(WebNode node)
        Indicates if a single subexpression is complex.
        An expression is complex if it cannot be created using the Web interface.
        This method overrides isNodeComplex by supporting expressions of type EnumDSSXMLExpressionType.DssXmlFilterListQual (element list expressions). It also checks if the styles supports attribute qualification, if it doesn't all other type of expressions are also considered complex, if it does, then it calls super.isNodeComplex to check if the expression is normally supported by attribute qualification
        Overrides:
        isNodeComplex in class PromptHierarchicalCartXHTMLTransform
        Parameters:
        node - the root node of the subexpression to check
        Returns:
        True if the Node is complex, that is, it cannot be created using this transform.
      • renderAdd

        public void renderAdd​(MarkupOutput out)
        Renders the add button information for the cart.
        It overwrites the parent renderAdd method by initializing specific JavaScript code associated with the button.
        Overrides:
        renderAdd in class PromptHierarchicalCartXHTMLTransform
        Parameters:
        out - MarkupOutput instance where the HTML content generated by this method will be saved
      • renderRemove

        public void renderRemove​(MarkupOutput out)
        Renders the remove button information for the cart.
        It overwrites the parent renderRemove method by initializing specific JavaScript code associated with the button.
        Overrides:
        renderRemove in class PromptHierarchicalCartXHTMLTransform
        Parameters:
        out - MarkupOutput instance where the HTML content generated by this method will be saved