Class ViewFilterElementPanelTransform

    • Constructor Detail

      • ViewFilterElementPanelTransform

        public ViewFilterElementPanelTransform()
    • Method Detail

      • initializeTransform

        public void initializeTransform​(Transformable data)
        Description copied from class: AbstractAppTransform

        This method initialize the private and protected fields of the transform, such as width and height. It also invokes the initializeWebComponent, initializeImages and initializeCss methods.

        This method is automatically called from the transform method. Transforms which would like to invoke other methods in this instance directly (for example, to invoke some render methods), need first to call this method to guarantee that the Transform is ready to generate output.
        Specified by:
        initializeTransform in interface AppTransform
        Overrides:
        initializeTransform in class AbstractAppTransform
        Parameters:
        data - the bean to transform.
      • getSupportedBeanType

        public java.lang.Class getSupportedBeanType()
        Description copied from class: AbstractAppTransform
        Returns the supported bean type. This abstract Transform supports all WebComponents so every sub-class should override this method to return the class of the Bean the Transform is expecting, for example:
         public class CustomReportClass extends AbstractAppTransform {
        
            public Class getSupportedBeanType() {
                //This Transform is expected to work only with a ReportBean,
                //therefore this method needs to return this class:
                return ReportBean.class;
            }
        
         }
         
        Specified by:
        getSupportedBeanType in interface Transform
        Overrides:
        getSupportedBeanType in class AbstractAppTransform
        Returns:
        a root class/interface supported by this transform.
      • renderEventHiddenInputs

        public void renderEventHiddenInputs​(MarkupOutput out)
        This method will render all of the hidden inputs for the events that will be used within the expression transform.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • getFormAttributes

        public java.util.Map getFormAttributes()
        Generate the extra attributes the main report form requires for its proper definition. Such attributes include the form name, action, method and any extra information required for it to work properly on iframe environments if needed.
        Returns:
        Map instance initialized with the extra attributes to include into the form's defintion
      • renderJavascript

        protected void renderJavascript​(MarkupOutput out)
        This method renders all javascript that will be necessary for the Transform to work correctly.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • renderViewFilter

        public void renderViewFilter​(MarkupOutput out)
        Renders the View Filter expressions by transforming the View Filter Element Bean child nodes.
        By default, the child nodes are the View Filter Expression Bean and the View Limit Expression Bean.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • renderHelpButton

        public void renderHelpButton​(MarkupOutput out)
        This method will render the help button for the editor. To find the event to associate with this button, it will call getHelpEvent. If that method returns null, then no help button will be rendered.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • renderCloseButton

        public void renderCloseButton​(MarkupOutput out)
        This method will render the close button for the editor. To find the event to associate with this button, it will call getCloseEvent. If that method returns null, then no close button will be rendered.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • renderHeaderAddCondition

        public void renderHeaderAddCondition​(MarkupOutput out)
        This method will render the add condition link, normally in the header of the editor.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • renderHeaderClearAll

        public void renderHeaderClearAll​(MarkupOutput out)
        This method will render the "clear all" button in the filter editor.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • renderHeaderAutoApply

        public void renderHeaderAutoApply​(MarkupOutput out)
        This method will render the auto-apply checkbox on the filter editor
        Parameters:
        out - The MarkupOutput object to render the output to.
      • renderApplyCancelButtons

        public void renderApplyCancelButtons​(MarkupOutput out)
        Function that displays apply and cancel buttons for the whole expression, when they are needed.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • renderEditorTitle

        public void renderEditorTitle​(MarkupOutput out)
        This method will simply render the title of the editor.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • renderEmptyFilterMessage

        public void renderEmptyFilterMessage​(MarkupOutput out)
        This method will check whether the filter that this transform is attempting to render is empty, and if it is, render a message saying that the filter is empty. If the filter is not empty, then nothing will be rendered.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • isOpen

        protected boolean isOpen()
        Description copied from class: AbstractAppTransform
        Defines whether this Transform is currently visible to the end user.
        Overrides:
        isOpen in class AbstractAppTransform
        Returns:
        true if the bean is visible
      • getHelpEvent

        public WebEvent getHelpEvent()
        Deprecated.
        Returns the WebEvent which is associated with the help button.
      • getCloseEvent

        public WebEvent getCloseEvent()
        Returns the event to be used for the close button.
        Returns:
        The close event.
      • getAddConditionEvent

        public WebEvent getAddConditionEvent()
        Returns the add condition event, which signals the intent to open the add wizard.
        Returns:
        The add condition event.
      • getCancelAllEvent

        public WebEvent getCancelAllEvent()
        Returns the cancel all event, which will cancel all un-applied changes.
        Returns:
        The cancel all event.
      • getEditor

        protected Editor getEditor()
        Returns an Editor object, which is used to render help/close buttons.
        Returns:
        An editor object.
      • getClearAllEvent

        public WebEvent getClearAllEvent()
        Returns the clear all event, which signals that the user wishes to clear the whole subexpression.
        Returns:
        The clear all event.
      • getApplyEvent

        public WebEvent getApplyEvent()
        Returns the event to be used for the apply button - this will handle synchronization of the ExpressionBean with the object it was retrieved from.
        Returns:
        The apply event.
      • getEmptyFilterMessage

        protected java.lang.String getEmptyFilterMessage()
        Returns the message that should be used if the filter is empty.
      • isEditableOrEmpty

        public boolean isEditableOrEmpty()
        This method returns if the editor is either editable or if it is empty. It is used to determine if we should render the title bar div.
        Returns:
        Whether the editor is either editable or if it is empty.
      • getMainDivAttributes

        public java.util.Map getMainDivAttributes()
        Returns the list of attributes to add to the main
        that makes up the filter editor GUI. These attributes must primarily be included for the javascript concerning the filter editor to work properly.
        Returns:
        A java.util.Map object whose keys are the attribute names, and the values are the attribute values. Both are String-typed.
      • getImageFolder

        protected java.lang.String getImageFolder()
        Returns the folder that images are expected to be stored in.
        Returns:
        The image folder.
      • isFilterEditorFrameEmpty

        protected boolean isFilterEditorFrameEmpty()
        This method evaluates whether the filter editor frame is empty. This is true if both View Filter and View Limit Beans contain empty expressions.
        Returns:
        Whether the filter editor frame is empty.
      • isEditable

        public boolean isEditable()
        Returns:
        Whether the filter is editable
      • isDesignMode

        protected boolean isDesignMode()
        Overrides the superclass' isDesignMode method. This method checks with the owner ReportFrameBean to determine whether the report is in design mode or not.
      • getAutoApply

        public boolean getAutoApply()
        Whether the current filter's autoapply setting is true or false.
        Returns:
        The current auto apply setting.
      • isAutoSynchronizeEnabled

        public boolean isAutoSynchronizeEnabled()
        This method returns whether the GUI should synchronize the expression on the expression bean with its source upon every operation. If this is false, then the apply/cancel buttons will be active.
        Returns:
        Whether auto-synchronize is enabled for this transform.
      • isApplyCancelEnabled

        public boolean isApplyCancelEnabled()
        Returns whether the apply/cancel buttons should be shown.
        Returns:
        True if the apply/cancel buttons should be shown, false otherwise.
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Transform
        Returns a textual description of the transform.
        Specified by:
        getDescription in interface Transform
        Returns:
        The textual description of the transform.
      • getStringFromDescriptorFP

        protected java.lang.String getStringFromDescriptorFP​(FormalParameter fp)
      • generateUpdateManagerEventJSString

        protected final void generateUpdateManagerEventJSString​(java.lang.StringBuffer buf,
                                                                java.lang.String beanPath,
                                                                WebEvent event,
                                                                java.lang.String[] args,
                                                                boolean restoreState)
        Generates the javascript for the onclick tag that is necessary to invoke the given event via the update manager, A String representing the javascript function call(s) necessary to invoke the given event.
        Parameters:
        beanPath - The path of the bean the event is being run upon.
        event - The WebEvent object representing the event to be run.
        args - An argument list consisting of {event ID1, eventValue1, eventID2, eventValue2,...}. This can be null if there are no arugments.
        restoreState - If this is true, then the best known restore state event will be added to the event.
      • getRestoreStateEvent

        public WebEvent getRestoreStateEvent()
        Returns the restore state event based upon the subexpression being edited.
        Returns:
        The restore state event to use to restore state changes within the filter editor from the last rendering.
      • generateMultiEventArgumentString

        protected final java.lang.String generateMultiEventArgumentString​(WebEvent[] eventList,
                                                                          java.lang.String[][] argsLists,
                                                                          boolean restoreState)
        Generates the multiple event argument string for the given event list, with the given argument lists. If restoreState is true, then the appropriate event to restore state will be appended to the beginning of the given events.
        Parameters:
        eventList - The list of events.
        argsLists - The list of argument lists, in the same order as the event list.
        restoreState - Whether to include the restore state event.
        Returns:
        The string representing the multiple event argument.
      • generateMultiEventArgumentString

        protected final java.lang.String generateMultiEventArgumentString​(WebEvent event,
                                                                          java.lang.String[] args,
                                                                          boolean restoreState)
        Generates the multiple event argument string for the given event, with the given arguments. If restoreState is true, then the appropriate event to restore state will be appended to the beginning of the given event.
        Parameters:
        event - The event.
        args - The argument list - argument name/value pairs in a flat array (i.e. name1, value1, name2, value2,...).
        restoreState - Whether to include the restore state event.
        Returns:
        The string representing the multiple event argument.
      • getBeanStateLevel

        protected int getBeanStateLevel()
        Returns the state level that the bean needs to be saved in for the transform to work properly.
        Returns:
        The bean state level required for the ExpressionBean.
      • getScriptClass

        protected java.lang.String getScriptClass()
        Description copied from class: AbstractAppTransform

        Returns the name of the javaScript class (if any) to be associated with the component. When the scriptClass is specified, a bone is registered on the page for this component.

        A bone is the corresponding concept of a bean in Microstrategy's javascript environment.
        By default, thie methods returns an empty string. Transform which does have an associated bone needs to override this method.
        Overrides:
        getScriptClass in class AbstractAppTransform
        Returns:
        String representing the name of a javaScript class