public class

ViewFilterElementPanelTransform

extends AbstractAppTransform
implements LayoutTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.transform.AbstractLayoutTransform
       ↳ com.microstrategy.web.app.transforms.AbstractAppTransform
         ↳ com.microstrategy.web.app.transforms.ViewFilterElementPanelTransform
Known Direct Subclasses

Class Overview

This transform displays the View Filter Panel on the Report page. It displays the View Filter along with the View Limits

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Fields
protected FormalParameterImpl _clearFilterImageTxtParam
protected String _cssAddConditionNonEditable
protected FormalParameterImpl _defaultAttrQualModeParam
protected ViewFilterElementPanelBean _filterElement
protected FormalParameterImpl _helpTopicNameParam This field is deprecated. No replacement.
protected FormalParameterImpl _showAddConditionButton
protected FormalParameterImpl _titleParam
public FormalParameter helpTopic Indicates the help topic for the help page of the editor.
public FormalParameter helpType Indicates the type of help topic this editor uses.
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Public Constructors
ViewFilterElementPanelTransform()
Public Methods
WebEvent getAddConditionEvent()
Returns the add condition event, which signals the intent to open the add wizard.
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.
boolean getAutoApply()
Whether the current filter's autoapply setting is true or false.
WebEvent getCancelAllEvent()
Returns the cancel all event, which will cancel all un-applied changes.
WebEvent getClearAllEvent()
Returns the clear all event, which signals that the user wishes to clear the whole subexpression.
WebEvent getCloseEvent()
Returns the event to be used for the close button.
String getDescription()
Returns a textual description of the transform.
Map getFormAttributes()
Generate the extra attributes the main report form requires for its proper definition.
WebEvent getHelpEvent()
This method is deprecated. No replacement.
Map getMainDivAttributes()
Returns the list of attributes to add to the main
that makes up the filter editor GUI.
WebEvent getRestoreStateEvent()
Returns the restore state event based upon the subexpression being edited.
Class getSupportedBeanType()
Returns the supported bean type.
void initializeCss()
This method initializes the CSS names used by the transform.
void initializeTransform(Transformable data)

This method initialize the private and protected fields of the transform, such as width and height.

boolean isApplyCancelEnabled()
Returns whether the apply/cancel buttons should be shown.
boolean isAutoSynchronizeEnabled()
This method returns whether the GUI should synchronize the expression on the expression bean with its source upon every operation.
boolean isEditable()
boolean isEditableOrEmpty()
This method returns if the editor is either editable or if it is empty.
void renderApplyCancelButtons(MarkupOutput out)
Function that displays apply and cancel buttons for the whole expression, when they are needed.
void renderCloseButton(MarkupOutput out)
This method will render the close button for the editor.
void renderEditorTitle(MarkupOutput out)
This method will simply render the title of the editor.
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.
void renderEventHiddenInputs(MarkupOutput out)
This method will render all of the hidden inputs for the events that will be used within the expression transform.
void renderHeaderAddCondition(MarkupOutput out)
This method will render the add condition link, normally in the header of the editor.
void renderHeaderAutoApply(MarkupOutput out)
This method will render the auto-apply checkbox on the filter editor
void renderHeaderClearAll(MarkupOutput out)
This method will render the "clear all" button in the filter editor.
void renderHelpButton(MarkupOutput out)
This method will render the help button for the editor.
void renderViewFilter(MarkupOutput out)
Renders the View Filter expressions by transforming the View Filter Element Bean child nodes.
void transformForRequestInError(MarkupOutput out)
Generates the output when the bean's status is WebBeanRequestEndsInError.
void transformForRequestSuccessful(MarkupOutput out)
Generates the output when the bean's status is WebBeanRequestSuccessful.
Protected Methods
final String generateMultiEventArgumentString(WebEvent[] eventList, String[][] argsLists, boolean restoreState)
Generates the multiple event argument string for the given event list, with the given argument lists.
final String generateMultiEventArgumentString(WebEvent event, String[] args, boolean restoreState)
Generates the multiple event argument string for the given event, with the given arguments.
final void generateUpdateManagerEventJSString(StringBuffer buf, String beanPath, WebEvent event, 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.
int getBeanStateLevel()
Returns the state level that the bean needs to be saved in for the transform to work properly.
String getBoneId()
Returns the id to be used for the JavaScript bone.
Editor getEditor()
Returns an Editor object, which is used to render help/close buttons.
String getEmptyFilterMessage()
Returns the message that should be used if the filter is empty.
String getImageFolder()
Returns the folder that images are expected to be stored in.
String getScriptClass()

Returns the name of the javaScript class (if any) to be associated with the component.

String getStringFromDescriptorFP(FormalParameter fp)
boolean isDesignMode()
Overrides the superclass' isDesignMode method.
boolean isFilterEditorFrameEmpty()
This method evaluates whether the filter editor frame is empty.
boolean isOpen()
Defines whether this Transform is currently visible to the end user.
void renderJavascript(MarkupOutput out)
This method renders all javascript that will be necessary for the Transform to work correctly.
void setBoneProperties(JsonGenerator boneProps)
Sets the necessary properties to the bone assigned to this transform (based on the scriptClass formal parameter)
Usually called by renderRegisterBone(MarkupOutput)
Can be overwritten to add or modify bone properties.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.AbstractAppTransform
From class com.microstrategy.web.transform.AbstractLayoutTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.app.transforms.AppTransform
From interface com.microstrategy.web.transform.LayoutTransform
From interface com.microstrategy.web.transform.Transform

Fields

protected FormalParameterImpl _clearFilterImageTxtParam

protected String _cssAddConditionNonEditable

protected FormalParameterImpl _defaultAttrQualModeParam

protected ViewFilterElementPanelBean _filterElement

protected FormalParameterImpl _helpTopicNameParam

This field is deprecated.
No replacement.

protected FormalParameterImpl _showAddConditionButton

protected FormalParameterImpl _titleParam

public FormalParameter helpTopic

Indicates the help topic for the help page of the editor.

public FormalParameter helpType

Indicates the type of help topic this editor uses.

Public Constructors

public ViewFilterElementPanelTransform ()

Public Methods

public WebEvent getAddConditionEvent ()

Returns the add condition event, which signals the intent to open the add wizard.

Returns
  • The add condition event.

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.

public boolean getAutoApply ()

Whether the current filter's autoapply setting is true or false.

Returns
  • The current auto apply setting.

public WebEvent getCancelAllEvent ()

Returns the cancel all event, which will cancel all un-applied changes.

Returns
  • The cancel all event.

public WebEvent getClearAllEvent ()

Returns the clear all event, which signals that the user wishes to clear the whole subexpression.

Returns
  • The clear all event.

public WebEvent getCloseEvent ()

Returns the event to be used for the close button.

Returns
  • The close event.

public String getDescription ()

Returns a textual description of the transform.

Returns
  • The textual description of the transform.

public 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

public WebEvent getHelpEvent ()

This method is deprecated.
No replacement.

Returns the WebEvent which is associated with the help button.

public 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.

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.

public Class getSupportedBeanType ()

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;
    }

 }
 

Returns
  • a root class/interface supported by this transform.

public void initializeCss ()

This method initializes the CSS names used by the transform. It overrides the initializeCss method on AbstractAppTransform.

public void initializeTransform (Transformable data)

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.

Parameters
data the bean to transform.

public boolean isApplyCancelEnabled ()

Returns whether the apply/cancel buttons should be shown.

Returns
  • True if the apply/cancel buttons should be shown, false otherwise.

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.

public boolean isEditable ()

Returns
  • Whether the filter is editable

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

public void transformForRequestInError (MarkupOutput out)

Generates the output when the bean's status is WebBeanRequestEndsInError. This method just calls displayError(MarkupOutput, String, String, Exception) with the title and message based on the error code from the bean's ErrorInfo, as provided by the the getErrorTitle and getErrorMessage methods accordingly.
Transforms that would like to generate customized output based on the error should extend this method.

Parameters
out output by this transform

public void transformForRequestSuccessful (MarkupOutput out)

Generates the output when the bean's status is WebBeanRequestSuccessful. This is the main entry point to generate the output for those Transforms that just want to render the "regular" bean case.
This is an abstract method. All classes need to implement it.

Parameters
out output by this transform

Protected Methods

protected final String generateMultiEventArgumentString (WebEvent[] eventList, 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.

protected final String generateMultiEventArgumentString (WebEvent event, 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.

protected final void generateUpdateManagerEventJSString (StringBuffer buf, String beanPath, WebEvent event, 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.

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.

protected String getBoneId ()

Returns the id to be used for the JavaScript bone.
This method is used by the renderRegisterBone method to indicate the id of the bone html element.

Returns
  • String

protected Editor getEditor ()

Returns an Editor object, which is used to render help/close buttons.

Returns
  • An editor object.

protected String getEmptyFilterMessage ()

Returns the message that should be used if the filter is empty.

protected String getImageFolder ()

Returns the folder that images are expected to be stored in.

Returns
  • The image folder.

protected String getScriptClass ()

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.

Returns
  • String representing the name of a javaScript class

protected String getStringFromDescriptorFP (FormalParameter fp)

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.

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.

protected boolean isOpen ()

Defines whether this Transform is currently visible to the end user.

Returns
  • true if the bean is visible

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.

protected void setBoneProperties (JsonGenerator boneProps)

Sets the necessary properties to the bone assigned to this transform (based on the scriptClass formal parameter)
Usually called by renderRegisterBone(MarkupOutput)
Can be overwritten to add or modify bone properties.

Parameters
boneProps the JsonGenerator object that contains the collection of bone properties.