Class AttributeFormsEditorTransform

  • All Implemented Interfaces:
    AppTransform, LayoutTransform, Transform

    public class AttributeFormsEditorTransform
    extends AbstractEditorTransform
    implements LayoutTransform

    This class generates the output for the AttributeFormsEditorBean. It is used to allow users to select the forms of an attribute to be displayed in a grid.

    The forms are displayed in a "shopping cart" interface, that is, a list of available forms is rendered on the left, and the list of selected forms is rendered on the right. Users can select forms and move them from the available to the selected and the other way around. To display the shopping cart this Transform utilizes a Cart GUI-element which provides all the necessary infrastructure to generate the corresponding HTML.

    In some scenarios this Transform may also presents a dropdown list which allows the user to select the corresponding attribute to whom the attribute forms shall be selected. This is controlled by the showAttributeList() method.

    This Transform implements LayoutTransform, therefore its render methods can be invoked using a custom layout-xml. When this is the case, the layout-xml specified in the style-catalog controls which methods are called and in which order. Otherwise, the default output of this transform is divided as follows:
         EditorContents
         -----------------------------------------------------
         |   Attribute list  | submitButton                  |
         -----------------------------------------------------
         |                                                   |
         |   Attribute Forms List                            |
         |                                                   |
         |                                                   |
         - - - - - - - - - - - - - - - - - - - - - - - - - - -
     
    Since:
    MicroStrategy Web 8.0.0
    • Field Detail

      • goImage

        public FormalParameter goImage
        Indicates the image to use for the submit button.
      • availableSize

        public FormalParameter availableSize
        Specifies the size of the Available listbox of the shopping cart.
    • Constructor Detail

      • AttributeFormsEditorTransform

        public AttributeFormsEditorTransform()
        Default empty constructor. Initialize formal parameters.
    • Method Detail

      • initializeCart

        protected void initializeCart​(Cart cart)
        Initializes the Cart instance used by this Transform.
        Parameters:
        cart - Cart to be initialzied.
      • getCart

        protected Cart getCart()
        Creates and initializes the Cart instance used by this Transform.
        Returns:
        The Cart object used to render the available and selected attributes forms.
      • getDescription

        public java.lang.String getDescription()
        Returns a textual description of this transform to be used in WYSIWYG tools.
        Specified by:
        getDescription in interface Transform
        Returns:
        "This class generates the output for the AttributeFormsEditorBean. It is used to allow users to select the forms of an attribute to be displayed in a grid."
      • showAttributeList

        public boolean showAttributeList()
        Controls whether the attribute list dropdown should be displayed to the user. It will return false in DHTML mode, or the value of the AttributeFormsEditorBean.getShowAttributeList() method.
        Returns:
        true if the attribute list should be displayed.
      • getAttributeFormsProcessEvent

        protected WebEvent getAttributeFormsProcessEvent()
        Returns an instance of the event responsible for processing the editor's actions
        Returns:
        the EnumAttributeFormsEditorEvents.WebEventAttributeFormsProcess event
      • renderEditorContents

        public void renderEditorContents​(MarkupOutput out)
        Main entry point of this transform. Generates the graphical output for this editor.
        Specified by:
        renderEditorContents in class AbstractEditorTransform
        Parameters:
        out - MarkupOutput to generate the HTML.
      • renderAttributeList

        public void renderAttributeList​(MarkupOutput out)
        Generates a dropdown with the list of attributes available in the report.
        Parameters:
        out - MarkupOutput to generate the HTML.
      • renderSubmitButton

        public void renderSubmitButton​(MarkupOutput out)
        Generates the HTML for the button that applies editor changes.
        Parameters:
        out - MarkupOutput to generate the HTML.
      • renderCart

        public void renderCart​(MarkupOutput out)
        Generates the "shopping cart" with the list of available and selected attribute forms. This method retrieve the forms list from AttributeFormsEditorBean.getAttributeForms(), with it, it populates two CartElements collections and then delegates to the Cart GUI-element the HTML generation.
        Parameters:
        out - MarkupOutput to generate the HTML.
      • renderHiddenInputs

        protected void renderHiddenInputs​(MarkupOutput out)
        Generates the hidden <INPUT> tags required by the AttributeFormsProcessEvent.
        Parameters:
        out - MarkupOutput to generate the HTML.