public abstract class

AbstractEditorTransform

extends AbstractAppTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.transform.AbstractLayoutTransform
       ↳ com.microstrategy.web.app.transforms.AbstractAppTransform
         ↳ com.microstrategy.web.app.transforms.AbstractEditorTransform
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This abstract transform class is used as a base object that provides common and convenience methods used to render a bean as an editor. The class uses the Editor to present the user with a window-like dialog. This dialog can contain a title, action buttons, and can be dragged and closed just like any window dialog in a non-web environment.

This class is provided to make the construction of such dialogs easier. If one wants to display a bean as an editor, a transform class must extend this class and implement renderEditorContents, method responsible for generating the contents of the dialog. The other elements in the dialog, i.e. title, buttons, can be controlled by the use of formal parameters.

Notice that this class does not implement the LayoutTransform; subclasses might decide to do so, though, in these cases the layout will only be applied to the content of the editor.

Summary

Constants
String FP_APPLY_JS
String FP_APPLY_LABEL
String FP_APPLY_LABEL_ID
String FP_CANCEL_JS
String FP_CANCEL_LABEL
String FP_CANCEL_LABEL_ID
String FP_CAN_AUTO_SIZE
String FP_CLOSE_EVENT
String FP_CLOSE_IMAGE
String FP_CLOSE_JS
String FP_CLOSE_LABEL
String FP_CLOSE_LABEL_ID
String FP_DHTML_CLOSE
String FP_DISABLE_OK_BUTTON
String FP_EDITOR_CONTENTS_STYLE
String FP_EDITOR_ELEMENTS
String FP_EDITOR_LAYOUT_FILE
String FP_EDITOR_SUBTYPE
String FP_HELP_PAGE This constant is deprecated. useuse FP_HELP_TYPE
String FP_HELP_TOPIC Constant specifying the name of the formal parameter for specifying the help topic for the help of the editor
String FP_HELP_TYPE Constant specifying the type of the help file this editor should point to
String FP_INCLUDE_DYNAMIC_SCRIPT
String FP_NAVIGATE_ON_SUBMIT
String FP_OK_JS
String FP_OK_LABEL
String FP_OK_LABEL_ID
String FP_RENDER_FORM
String FP_TITLE_LABEL
String FP_TITLE_LABEL_ID
String FP_USE_JS_IN_BONE
[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Fields
protected String _helpTopic
protected String _helpType
public FormalParameter applyJS Indicates JavaScript functionality to be invoked when 'Apply' buttons is pressed.
public FormalParameter applyLabel Indicates the apply label when no title id is provided.
public FormalParameter applyLabelID Indicates the apply label id according to the application's resource buldles.
public FormalParameter canAutoSize Indicates if editor should auto-size to show the contents.
public FormalParameter cancelJS Indicates JavaScript functionality to be invoked when 'Cancel' buttons is pressed.
public FormalParameter cancelLabel Indicates the cancel label when no title id is provided.
public FormalParameter cancelLabelID Indicates the cancel label id according to the application's resource buldles.
public FormalParameter closeEvent Indicates the close event to use by the close button.
public FormalParameter closeImage Indicates the image to use in the close button.
public FormalParameter closeJS Indicates JavaScript functionality to be invoked when 'Close' buttons is pressed.
public FormalParameter closeLabel Indicates the close label when no title id is provided.
public FormalParameter closeLabelID Indicates the close label id according to the application's resource buldles.
public FormalParameter dhtmlClose Indicates if the close action will be executed using dhtml.
public FormalParameter disableOKButton Indicates whether to disable the OK button
public FormalParameter editorContentsStyle Indicates the style name to be used for the div containing the editor contents
public FormalParameter editorElements Indicates the elements to display by the editor.
public FormalParameter editorLayoutFile Indicates the name of the definition file associated with the editor.
public FormalParameter editorSubType Indicates the subtype to be used for the STY attribute for the editor container
public FormalParameter helpPage This field is deprecated. use helpType
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 FormalParameter includeDynamicScript Indicates whether dynamic scripts will be included while rendering the page.
public FormalParameter navigateOnSubmit Indicates if the editor will move to a new page after the user clicks on the OK button
public FormalParameter okJS Indicates JavaScript functionality to be invoked when 'OK' buttons is pressed.
public FormalParameter okLabel Indicates the OK label when no title id is provided.
public FormalParameter okLabelID Indicates the OK label id according to the application's resource buldles.
public FormalParameter renderForm Indicates whether the editor will create its own form.
public FormalParameter titleLabel Indicates the title when no title id is provided.
public FormalParameter titleLabelID Indicates the title id according to the application's resource buldles.
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Public Constructors
AbstractEditorTransform()
Default no-args constructor, initialize formal parameters.
Public Methods
Tag getDivTagAroundContents()
Wrap around the contents of an editor with a div that can set the overflow, style and subtype properties
WebBeanError getWebBeanErrorInfo()
void initializeTransform(Transformable data)
This method initializes the private and protected fields of the transform.
void renderEditor(MarkupOutput out)
Main method to render the output of an editor
abstract void renderEditorContents(MarkupOutput out)
Generates the graphical output for the Editor
void transformForRequestInError(MarkupOutput out)
Transform when the status is In Error.
void transformForRequestSuccessful(MarkupOutput out)
Generates the graphical output for the Projects Bean
Protected Methods
Tag generateForm()
String getEditorTitle()
String getOnSubmitJS()
Provides JS code to be executed on the "onsubmit" event of the HTML form.
void initEditor(Editor editor)
Initializes the editor with the global settings.
void initHelp(Editor editor)
MarkupOutput renderEditorElement(Editor editor)
void renderJavascript(MarkupOutput out)
This method should be used by the Editor transforms to generate any javascript necessary.
void setFocusFieldId(String value)
[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.Transform

Constants

public static final String FP_APPLY_JS

Constant Value: "applyJS"

public static final String FP_APPLY_LABEL

Constant Value: "applyLabel"

public static final String FP_APPLY_LABEL_ID

Constant Value: "applyLabelID"

public static final String FP_CANCEL_JS

Constant Value: "cancelJS"

public static final String FP_CANCEL_LABEL

Constant Value: "cancelLabel"

public static final String FP_CANCEL_LABEL_ID

Constant Value: "cancelLabelID"

public static final String FP_CAN_AUTO_SIZE

Constant Value: "canAutoSize"

public static final String FP_CLOSE_EVENT

Constant Value: "closeEvent"

public static final String FP_CLOSE_IMAGE

Constant Value: "closeImage"

public static final String FP_CLOSE_JS

Constant Value: "closeJS"

public static final String FP_CLOSE_LABEL

Constant Value: "closeLabel"

public static final String FP_CLOSE_LABEL_ID

Constant Value: "closeLabelID"

public static final String FP_DHTML_CLOSE

Constant Value: "dhtmlClose"

public static final String FP_DISABLE_OK_BUTTON

Constant Value: "disableOKButton"

public static final String FP_EDITOR_CONTENTS_STYLE

Constant Value: "editorContentsStyle"

public static final String FP_EDITOR_ELEMENTS

Constant Value: "editorElements"

public static final String FP_EDITOR_LAYOUT_FILE

Constant Value: "editorLayoutFile"

public static final String FP_EDITOR_SUBTYPE

Constant Value: "editorSubType"

public static final String FP_HELP_PAGE

This constant is deprecated.
useuse FP_HELP_TYPE

Constant specifying the name of the formal parameter for specifying the sub-page of the help for the editor

Constant Value: "helpPage"

public static final String FP_HELP_TOPIC

Constant specifying the name of the formal parameter for specifying the help topic for the help of the editor

Constant Value: "helpTopic"

public static final String FP_HELP_TYPE

Constant specifying the type of the help file this editor should point to

Constant Value: "helpType"

public static final String FP_INCLUDE_DYNAMIC_SCRIPT

Constant Value: "includeDynamicScript"

public static final String FP_NAVIGATE_ON_SUBMIT

Constant Value: "navigateOnSubmit"

public static final String FP_OK_JS

Constant Value: "okJS"

public static final String FP_OK_LABEL

Constant Value: "okLabel"

public static final String FP_OK_LABEL_ID

Constant Value: "okLabelID"

public static final String FP_RENDER_FORM

Constant Value: "renderForm"

public static final String FP_TITLE_LABEL

Constant Value: "titleLabel"

public static final String FP_TITLE_LABEL_ID

Constant Value: "titleLabelID"

public static final String FP_USE_JS_IN_BONE

Constant Value: "useJSInBoneInfrastructure"

Fields

protected String _helpTopic

protected String _helpType

public FormalParameter applyJS

Indicates JavaScript functionality to be invoked when 'Apply' buttons is pressed.

public FormalParameter applyLabel

Indicates the apply label when no title id is provided.

public FormalParameter applyLabelID

Indicates the apply label id according to the application's resource buldles.

public FormalParameter canAutoSize

Indicates if editor should auto-size to show the contents.

public FormalParameter cancelJS

Indicates JavaScript functionality to be invoked when 'Cancel' buttons is pressed.
JS functions set on this parameter are expected to be defined on the JS bone rendered by this editor (defined by getScriptClass()).
If the function set is not on the appropriate editor bone, it must be called as: "customJS('alert(\'in\');"

public FormalParameter cancelLabel

Indicates the cancel label when no title id is provided.

public FormalParameter cancelLabelID

Indicates the cancel label id according to the application's resource buldles.

public FormalParameter closeEvent

Indicates the close event to use by the close button.

public FormalParameter closeImage

Indicates the image to use in the close button.

public FormalParameter closeJS

Indicates JavaScript functionality to be invoked when 'Close' buttons is pressed.
JS functions set on this parameter are expected to be defined on the JS bone rendered by this editor (defined by getScriptClass()).
If the function set is not on the appropriate editor bone, it must be called as: "customJS('alert(\'in\');"

public FormalParameter closeLabel

Indicates the close label when no title id is provided.

public FormalParameter closeLabelID

Indicates the close label id according to the application's resource buldles.

public FormalParameter dhtmlClose

Indicates if the close action will be executed using dhtml.

public FormalParameter disableOKButton

Indicates whether to disable the OK button

public FormalParameter editorContentsStyle

Indicates the style name to be used for the div containing the editor contents

public FormalParameter editorElements

Indicates the elements to display by the editor. The flags are taken from the EnumEditorDisplayFlags enumeration.

public FormalParameter editorLayoutFile

Indicates the name of the definition file associated with the editor.

public FormalParameter editorSubType

Indicates the subtype to be used for the STY attribute for the editor container

public FormalParameter helpPage

This field is deprecated.
use helpType

Indicates the sub-page for the help for the editor.

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 FormalParameter includeDynamicScript

Indicates whether dynamic scripts will be included while rendering the page.
Usage:
This is a Boolean formal parameter, where true indicates that the dynamic javascripts will be included, false otherwise.

public FormalParameter navigateOnSubmit

Indicates if the editor will move to a new page after the user clicks on the OK button

public FormalParameter okJS

Indicates JavaScript functionality to be invoked when 'OK' buttons is pressed.
JS functions set on this parameter are expected to be defined on the JS bone rendered by this editor (defined by getScriptClass()).
If the function set is not on the appropriate editor bone, it must be called as: "customJS('alert(\'in\');"

public FormalParameter okLabel

Indicates the OK label when no title id is provided.

public FormalParameter okLabelID

Indicates the OK label id according to the application's resource buldles.

public FormalParameter renderForm

Indicates whether the editor will create its own form.

public FormalParameter titleLabel

Indicates the title when no title id is provided.

public FormalParameter titleLabelID

Indicates the title id according to the application's resource buldles.

Public Constructors

public AbstractEditorTransform ()

Default no-args constructor, initialize formal parameters.

Public Methods

public Tag getDivTagAroundContents ()

Wrap around the contents of an editor with a div that can set the overflow, style and subtype properties

Returns
  • Tag DivTag instance that can be used to wrap around the contents

public WebBeanError getWebBeanErrorInfo ()

Returns
  • the error info

public void initializeTransform (Transformable data)

This method initializes the private and protected fields of the transform.

Parameters
data bean that will be transformed

public void renderEditor (MarkupOutput out)

Main method to render the output of an editor

Parameters
out MarkupOutput instance where to create the HTML output

public abstract void renderEditorContents (MarkupOutput out)

Generates the graphical output for the Editor

Parameters
out MarkupOutput instance where to create the HTML output

public void transformForRequestInError (MarkupOutput out)

Transform when the status is In Error.

Parameters
out output by this transform

public void transformForRequestSuccessful (MarkupOutput out)

Generates the graphical output for the Projects Bean

Parameters
out MarkupOutputinstance where to create the HTML output

Protected Methods

protected Tag generateForm ()

protected String getEditorTitle ()

protected String getOnSubmitJS ()

Provides JS code to be executed on the "onsubmit" event of the HTML form.
Used for customizations where an action is needed before the form is submitted.
Note: this is only used when the editor uses an event and not JS on the OK/Apply buttons. For those cases use the "okJS" or "applyJS" formal parameters

Returns
  • JS code to be executed on the "onsubmit" event of the HTML form.

protected void initEditor (Editor editor)

Initializes the editor with the global settings.

Parameters
editor the Editor to modify.

protected void initHelp (Editor editor)

protected MarkupOutput renderEditorElement (Editor editor)

protected void renderJavascript (MarkupOutput out)

This method should be used by the Editor transforms to generate any javascript necessary.
The default implementation includes a call to the ClientSideHelper to render the dynamic scrips and the registerBone call.

Parameters
out MarkupOutput where the output should be rendered.

protected void setFocusFieldId (String value)