public abstract class

AbstractAppTransform

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

Class Overview

AbstractAppTransform is an abstract class that acts as the parent of all Transforms used by Web Universal. It's job is to abstract general behavior that can be inherited by all the classes who extend it. There are several reasons to have a parent abstract class, among them:

  • Include the set of methods and FormalParameters that are shared among all our transforms.
  • Ensure that all transform follow the same execution flow.
  • Ensure the basic HTML structure of all transforms is consistent across the application.

The AbstractAppTransform defines a set of methods that can be overridden or extended by the concrete classes that implement it. In general, it defines a transform method for each of the possible bean states, and keeps abstract only the transformForRequestSuccessful that each class needs to implement.
It implements methods to initialize the transform from its data, initialize images, css classes and other transform fields.

It provides convenience methods to get descriptors, add formal parameters, check for features and get resource folders

Finally it defines a set of formal parameters common to all transforms, such as cssName, cssPrefix and initialIndent.

The entry point method is transform(Transformable, MarkupOutput). This method calls the method initializeTransform(Transformable) and the method renderShell(MarkupOutput); all these methods can be overriden by any class extending the AbstractAppTransform class and take advantage of this predefine flow.

The renderShell(MarkupOutput) outputs the basic container of the transform. This container consists of a <DIV> tag that holds the name and information the application requires to interact with the bean. Information in this shell includes whether the bean can be updated using the iframe update technology, whether the bean appears as a popup dialog and the name of the javascript class associated, if any.

The javascript class informs the DHTML code the bone associated with this component. A bone is the corresponding concept of a bean in Microstrategy's javascript environment. Those Transforms that require a bone should override the getScriptClass() method.

The renderShell method will then call the checkStatus(MarkupOutput) method. The latter, based on the XML status (EnumRequestStatus) of the report will call:

Summary

Nested Classes
class AbstractAppTransform.Context This is the implementation of the TransformContext used by this Transform. 
Constants
String FP_APPLIES_TO Constant for the name of the appliesTo Formal Parameter.
String FP_CONTEXT_MENUS Constant for the name of the contextMenus Formal Parameter.
String FP_CSS_ERROR_MESSAGE This constant is deprecated. The css class to use cannot be controlled through a formal parameter anymore.
String FP_CSS_ERROR_TITLE This constant is deprecated. The css class to use cannot be controlled through a formal parameter anymore.
String FP_CSS_FILE Constant for the name of the cssFile Formal Parameter.
String FP_CSS_PREFIX Constant for the name of the cssPrefix Formal Parameter.
String FP_DEBUG_ERROR_FLAGS Constant for the name of the debugErrorFlags Formal Parameter.
String FP_DEBUG_FLAGS Constant for the name of the debugFlags Formal Parameter.
String FP_DRAG_MODE Constant for the name of the dragMode Formal Parameter.
String FP_EXTRA_INPUT Constant for the name of the extraInput Formal Parameter.
String FP_EXTRA_URL Constant for the name of the extraUrl Formal Parameter.
String FP_HEIGHT Constant for the name of the height Formal Parameter.
String FP_IFRAME_ENABLED Constant for the name of the iframeEnabled Formal Parameter.
String FP_IMG_WAIT This constant is deprecated. The wait image is generated using css.
String FP_INITIAL_INDENT This constant is deprecated. Indentation is not generated by Transforms anymore.
String FP_ORIENTATION Constant for the name of the orientation Formal Parameter.
String FP_ORIENTATIONS_ALLOWED Constant for the name of the orientationsAllowed Formal Parameter.
String FP_PARTIAL_IFRAME_UPDATE Constant for the name of the partialIframeUpdate Formal Parameter.
String FP_PROCESSING_BUTTONS_FLAGS Constant for the name of the processingButtonsFlags Formal Parameter.
String FP_PROCESSING_INFO_FLAGS Constant for the name of the processingButtonsFlags Formal Parameter.
String FP_RESIZE_LEVEL Constant for the name of the resizeLevel Formal Parameter.
String FP_SCRIPT_CLASS Constant for the name of the scriptClass formal parameter.
String FP_TYPE Constant for the name of the type Formal Parameter.
String FP_USE_DHTML
String FP_WIDTH Constant for the name of the width Formal Parameter.
int PROCESSING_BUTTONS_ALL Allowed value for the processingButtonsFlags formal parameter.
int PROCESSING_BUTTONS_CANCEL Allowed value for the processingButtonsFlags formal parameter.
int PROCESSING_BUTTONS_HISTORY_LIST Allowed value for the processingButtonsFlags formal parameter.
int PROCESSING_BUTTONS_REFRESH Allowed value for the processingButtonsFlags formal parameter.
int PROCESSING_BUTTONS_VIEW_DETAILS Allowed value for the processingButtonsFlags formal parameter.
int PROCESSING_INFO_ALL Allowed value for the processingInfoFlags formal parameter.
int PROCESSING_INFO_DESCRIPTION Allowed value for the processingInfoFlags formal parameter.
int PROCESSING_INFO_LAST_UPDATE Allowed value for the processingInfoFlags formal parameter.
int PROCESSING_INFO_NAME Allowed value for the processingInfoFlags formal parameter.
int PROCESSING_INFO_NONE Allowed value for the processingInfoFlags formal parameter.
int PROCESSING_INFO_STATUS Allowed value for the processingInfoFlags formal parameter.
int RESIZE_ALL Constant to indicate that the component can be resized both, horizontally and vertically.
int RESIZE_HORIZONTAL Constant to indicate that the component can be resized horizontally.
int RESIZE_NONE Constant to indicate that the component cannot be resized.
int RESIZE_VERTICAL Constant to indicate that the component can be resized vertically.
Fields
protected final String CLASS_INPUT This field is deprecated. This property is not used anymore by the transform.
protected final String CLASS_MESSAGE This field is deprecated. This property is not used anymore by the transform.
protected WebComponent _bean Instance of WebComponent being transformed.
protected ComponentBlock _componentBlock
protected String _cssPrefix Property corresponding to the value of the cssPrefix formal parameter
protected String _imgBlank Field that containts the URL location of a blank image (used as the source of most <IMG> tags as the real URL is specified through css).
protected String _imgWait This field is deprecated. This value is not used anymore by the Transform as the wait image is included using css.
protected MarkupOutput _selfOutput This field is deprecated. this field is no longer used since partial update blocks are now generated via ComponentBlock
protected MarkupOutput _subOutput This field is deprecated. this field is no longer used since partial update blocks are now generated via ComponentBlock
public FormalParameter appliesTo

This parameter informs the javascript the id of the bone the actions of this component applies to.

public FormalParameter contextMenus

This formal parameter is used by the Transform to identify the context-menus definition.

public FormalParameter cssFile CSS file that includes the style definition.
public FormalParameter cssPrefix Prefix to append to all css class names.
public FormalParameter debugErrorFlags Indicates which extra debug information to include in case of an error.
public FormalParameter debugFlags Indicates which debug information to include.
public FormalParameter dragMode Indicates the drag mode that the component to render will have.
public FormalParameter extraInput Indicates any extra inputs to be included in the forms generated by the transform.
public FormalParameter extraUrl Indicates any extra parameters to be included in the links generated by the transform.
public FormalParameter globalCssErrorMessage This field is deprecated. The css class to use cannot be controlled through a formal parameter anymore.
public FormalParameter globalCssErrorTitle This field is deprecated. The css class to use cannot be controlled through a formal parameter anymore.
public FormalParameter height Indicates the default height of the component.
public FormalParameter iframeEnabled Indicates whether the transform supports iframe manipulations.
public FormalParameter imgWait This field is deprecated. This value is not used anymore by the Transform as the wait image is included using css.
protected int indent This field is deprecated. Indentation is not appended by Transforms anymore. Although it provided a somewhat better looking HTML source, it also affected performance by increasing the HTML size.
public FormalParameter initialIndent This field is deprecated. Indentation is not appended by Transforms anymore. Although it provided a somewhat better looking HTML source, it also affected performance by increasing the HTML size.
protected boolean isDHTML This field is deprecated. Use isDhtml().
public FormalParameter orientation Indicates the orientation the dialog to render will have.
public FormalParameter orientationsAllowed Indicates the orientation modes allowed for the dialog to render.
public FormalParameter partialIframeUpdate

This formal parameter specifies whether we should replace the whole contentst of the div shell (outerHTML) or the just the inner contents (innerHTML) of that shell div for the transform when the iframe update is going on.

public FormalParameter processingButtonsFlags Indicates which buttons to include on the wait page.
public FormalParameter processingInfoFlags Indicates which information to include on the wait page.
public FormalParameter resizeLevel Indicates whether the component can be resized vertically/horizontally or both or none.
public FormalParameter scriptClass Holds the name of the javaScript class (if any) to be associated with the component.
public FormalParameter type

This parameter is used when the output of this Transform generates a corresponding Microstrategy bone in the page, and it informs the javascript the type of bone it is.

public FormalParameter useDHTML Indicates whether to use DHTML on the output.
public FormalParameter width Indicates the default width of the component.
Public Constructors
AbstractAppTransform()
Default no-args constructor, initializes formal parameters.
Public Methods
String addContactInfo(String message)
This method is deprecated. this function is not used anymore.
FormalParameter addFormalParameter(String name, int type, Object defaultValue, String description)
Adds a formal parameter for this transform with the given information
Map getAttributesShellDiv()
Returns a Map with the list of attributes that the shell div must use.
String getDateFormat()
MarkupOutput getDebugOut(int debugFlags)
Get the Debug Information into the output
String getDescriptor(int key)

Get the descriptor for the given key.

String getDescriptor(String key)

Get the descriptor for the given key.

String getDescriptor(String key, String defaultDescriptor)
String getDisplayMode()
get the display mode used when the GuiComponent renders itself
String getDisplayName(WebObjectInfo object)
String getErrorMessage(int errorCode, String defaultMessage)
Returns the error message for the transform, based on the exception.
String getErrorMessage(Exception e)
Returns the error message for the transform, based on the exception.
String getErrorTitle(Exception e)
Returns the error title for the transform, based on the exception.
String getErrorTitle(int errorCode)
Returns the error title for the transform, based on the errorCode.
EventManager getEventManager()
Convenience method for obtaining the EventManager instance associated with this transform
int getFirstDayOfWeek()
String getHelpPath()
Returns the help path for the help type of user.
String getID()
Returns the unique name of the component to be used as the ID for its shell.
static Locale getLocale(AppContext appCtx, boolean isNumberDate, Locale defaultLocale)
String getPreferenceValue(String preferenceName)
Convenience method that returns the value of a preference.
String getResourcesFolder(String folderType)
Maps the AppContext's getResourceFolder method, but it validates that the getBeanContext is indeed an AppContext.
String getStyleShellDiv()
Returns the style (that is, the style attribute used for css formatting) of the shell's div.
Class getSupportedBeanType()
Returns the supported bean type.
TagsFactory getTagsFactory()
Convenience method for obtaining an instance of the TagsFactory class.
String getTimeFormat()
WebBeanError getWebBeanErrorInfo()
boolean hasSubBlock()
This method is deprecated. this method is no longer used
void initializeCss()
Initialize the css classes to be used by this transform.
void initializeImages()
Initialize the images to be used by this transform.
void initializeTransform(Transformable data)

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

void initializeWebComponent(Transformable data)
Initialize the web component to be used by the transform.
boolean is508()
Determine if the environment where this transform instance is being used is DHTML or not
boolean isContextMenusEnabled()
Indicates whether context-menus are enabled for this Transform.
boolean isDhtml()
Determine if the environment where this transform instance is being used is DHTML or not
boolean isDormant()
boolean isFeatureAvailable(String feature)
Convenience method.
boolean isIFrameDisplayMode()
Determines if the display mode should consider iframe request or not.
boolean isIFrameRequest()
Return true if the current request was generated from an iFrame update.
boolean isJobExpired(int errorCode)
Determines, based on the errorCode, if the error is because the message has expired in the iServer.
boolean isPortlet()
Indicates web page is used as a portlet.
void renderBean(MarkupOutput out, String name)
Renders any bean within the hierachy using its default style
void renderBean(MarkupOutput out, String name, String style)
Renders any bean within the hierachy using the specified style
void renderBlockEnd(MarkupOutput out)
This method is deprecated. this method is no longer used. We now create ComponentBlock to render a component block in json
void renderBlockStart(MarkupOutput out, String blockId, Map<String, String> attrs)
This method is deprecated. this method is no longer used. We now create ComponentBlock to render a component block in json
void renderCssLink(MarkupOutput out)
Generates a LINK tag in pointing to the name of the file as controlled through the cssFile formal parameter.
void renderDescriptor(MarkupOutput out, int key)
Generates the string associted with a descriptor in the given MarkupOutput.
void renderDescriptor(MarkupOutput out, String key)
Generates the string associted with a descriptor in the given MarkupOutput.
void renderErrorButton(MarkupOutput out)
Renders the reexecute event button Transfrom will override it if necessary
void renderHiddenInputFromRequest(MarkupOutput out, String name)
Renders a hidden input if the name is found on the request keys.
void renderImage(MarkupOutput out, String image)
Renders a transform's image
void renderProcessingButtons(MarkupOutput out)
Renders the buttons displayed to the end user when the request is still processing (for example, in the wait page).
void renderProcessingInfo(MarkupOutput out)
Generates the the information about the execution when the request is still processing (for example, in the wait page).
void renderProcessingInfoImage(MarkupOutput out)
Generates the image on the wait page.
void renderProcessingInfoSubtitle(MarkupOutput out)
Generated the message "Please wait or choose one of the following actions"
void renderSelf(MarkupOutput out, String style)
Renders the bean associated with this transform ("self") using the specified style.
void renderShell(MarkupOutput out)

Generates the shell for this Transform.

boolean renderSubBlock()
the boolean indicates whether this GuiComponent allows sub json blocks to update or just pure HTML
void renderUserHelpAnchor(MarkupOutput out, String name)
void setDisplayMode(String value)
set the display mode used when the GuiComponent renders itself
void setHasSubBlock(boolean newValue)
set the flag to signal whether this transform will output pure html or an array of sub json blocks to update itself
void setIFrameDisplayMode(boolean value)
Determines if the display mode should consider iframe request or not.
void setIsDormant(boolean isDormant)
Tells the transform whether the bone is dormant or not, in which case it should not receive event notification.
void setRenderSubBlock(boolean newValue)
set the flag to signal whether this GuiComponent allows sub json blocks to render so that partial update happens within the original GuiComponent
void setShellAttributeOnClosedComponent(HashMap __result)
final void transform(Transformable data, MarkupOutput out)
Transform the data into output.
void transformForRequestCanceled(MarkupOutput out)
Generates the output when the bean's status is WebBeanRequestCanceled.
void transformForRequestInError(MarkupOutput out)
Generates the output when the bean's status is WebBeanRequestEndsInError.
void transformForRequestNotInited(MarkupOutput out)
Generates the output when the bean's status is WebBeanRequestNotInitiated.
void transformForRequestProcessing(MarkupOutput out)
Generates the output when the bean's status is WebBeanRequestProcessing.
abstract void transformForRequestSuccessful(MarkupOutput out)
Generates the output when the bean's status is WebBeanRequestSuccessful.
void transformForRequestWaitingForUserInput(MarkupOutput out)
Generates the output when the bean's status is WebBeanRequestWaitingForUserInput, that is when the bean needs to answer prompts.
Protected Methods
void addDynamicScriptClass(String jsClassName)
Add the script dependency based on the JavaScript class.
void addDynamicScriptFile(String file, String key)
Adds a javascript file that the Transform requires for its correct behavior.
boolean checkLevel(int level, FormalParameter parameter)
This a helper methoc that will check if the level parameter value contains this flag.
boolean checkProcessingButtonsFlag(int flag)
boolean checkProcessingInfoFlag(int flag)
void checkStatus(MarkupOutput out)
void displayError(MarkupOutput out, String className, String methodName, Exception e, String title, String message)
Generates an error message to the end user.
void displayError(MarkupOutput out, String className, String methodName, Exception e, String title, String message, boolean addContactInfo)
Generates an error message to the end user.
void displayError(MarkupOutput out, String className, String methodName, Exception e)
Generates an error message to the end user.
String emptyCell()
Convenience method that checks if the output format is SCREEN_READER and determines whether to show a " " or HTMLHelper.SCREEN_READER_EMPTY_CELL_DISPLAY.
boolean excludeStaticTags()
Indicates if a layout transformation will include or exclude static code defined in the layout file.
AnchorTag generateAnchor(WebEvent event)
Creates an <a> tag from the EventManager.
AnchorTag generateAnchorForExport(WebEvent event)
Creates an anchor tag to be used especifically for Export requests
void generateHiddenInputsForEvent(MarkupOutput out, int eventId)
Tag generateIFrameTag(String name)
AppContext getAppContext()
Convenience method that returns the current AppContext.
String getArgumentName(WebEvent event, int argumentID)
For the given event, returns the name of the argument with the given ID.
String getBeanPath()
Returns the path within the application of the WebBean being transformed.
String getBoneId()
Returns the id to be used for the JavaScript bone.
WebEvent getCancelEvent()
ClientSideHelper getClientSideHelper()
Obtain an instance of the ClientSideHelper class
ContainerServices getContainerServices()
Convenience method to retrieve the connected Container Services object.
TransformContext getContext()
Returns the instance of TransformContext with context information for this Transform.
ContextMenu getContextMenu(String menuName)
Returns the corresponding context-menu.
ContextMenuManager getContextMenuManager()
Returns the ContextMenuManager instance used by this Transform.
String getContextMenuManagerName()
Returns the name to use for the ContextMenuManager of this Transform.
ShortcutListSet getContextMenusDefinition()
Returns the definition used to populate the context-menus of this Transform.
String getCssPrefix()
static float getFloatValue(FormalParameter parameter)
Returns the float value of a FormalParameter.
static int getIntValue(FormalParameter parameter)
Returns the int value of a FormalParameter.
String getJSNameSpace()
Returns a unique name space used by the getID method as a prefix of the component's id
LayoutContext getLayoutContext(Transformable data, boolean excludeStaticTags)
Gets the LayoutContext instance to use for any layout processing.
Locale getLocale()
Returns number/date locale.
String getProjectID()
Private method that gets the Project ID from the session manager
WebEvent getRefreshEvent()
RequestKeys getRequestKeys()
If the beanContenxt of the associated bean is an instance of AppContext, the method returns the RequestKeys object associated with it
String getScriptClass()

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

static String getStringValue(FormalParameter parameter)
Returns the string value of the Formal Paramter.
StyleRequestContext getStyleRequestContext(WebComponent webComponent)
Since the addition of the dynamic style catalog, it was required to pass the Request Context object to obtain a transform.
String getUnitsLabel(String unitsID)
Returns the descriptor associated with unit.
void initHeightAndWidthFromPreferences()
Initializes the _height and _width of this component from the bone dimesions retrieved from Preferences.
boolean isBlockMode()
Helper method indicating whether the transform is in block mode or not
boolean isDialog()
Defines whether this Transform should behave as a dialog (for example, a pop-up window).
boolean isIFrameEnabled()
Whether iframe update technology is enabled for this Transform.
boolean isModal()
Defines whether this Transform should behave as a modal component (that is, it's displayed on top of the page and while open nothing else can be used).
boolean isOpen()
Defines whether this Transform is currently visible to the end user.
static boolean isTrue(FormalParameter parameter)
Checks for a Boolean FormalParamter and return its booleanValue().
boolean localIsIFrameDisplayMode()
Called by isIFrameDisplayMode(), it helps determining if the display mode of this transform should be generated for iframe manipulation or not.
TransformContext newContext()
Creates a new instance of a TransformContext.
ParameterBuilder newHiddenInputBuilder()
Convenience method to retrieve a new instance of a Hidden Input Builder from the connected Container Services object.
NamespaceEncoder newNamespaceEncoder()
Convenience method to retrieve a new instance of a Namespace Encoder from the connected Container Services object.
ParameterBuilder newURIBuilder()
Convenience method to retrieve a new instance of a URI Builder from the connected Container Services object.
void redirectToDisplayError(MarkupOutput out, String errorMessage)
This method is used to jump to a new "Error page" to show error messages.
void renderBean(MarkupOutput out, WebComponent beanToRender, String style)
void renderBean(MarkupOutput out, WebComponent beanToRender, String style, boolean iframeDisplayMode)
void renderCancelButton(MarkupOutput out)
Renders the Cancel button for the wait page.
void renderContextMenus(MarkupOutput out)
Generates the HTML necessary to use context-menus with this transform.
boolean renderLayout(MarkupOutput out)
Renders the transform information using layout-xml.
void renderProcessingButton(MarkupOutput out, WebEvent event, String buttonDescriptor)
Renders one button for the Wait page.
void renderProcessingButton(MarkupOutput out, WebEvent event, String buttonDescriptor, String buttonCSS)
Renders one button for the Wait page.
void renderProcessingButtonForGet(MarkupOutput out, WebEvent event, String buttonDescriptor, String buttonCSS)
Renders one button for the Wait page.
void renderProcessingInfoData(MarkupOutput out, String propertyName, String propertyValue)
This method is used in the wait page to generate data about the current execution.
void renderProcessingInfoTitle(MarkupOutput out)
Generates the title when the request is still processing (for example, in the wait page).
void renderProcessingObjectName(MarkupOutput out)
void renderRefreshButton(MarkupOutput out)
Renders the Refresh button for the wait page.
void renderRegisterBone(MarkupOutput out)
If a scriptClass is specified, this method registers the corresponding javascript bone for this component.
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.
void setHeight(String height)
Registers the height of the component.
void setWidth(String width)
Registers the width of the component.
boolean shouldDisplay()
Determines whether the transform should render itself or not.
[Expand]
Inherited Methods
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_APPLIES_TO

Constant for the name of the appliesTo Formal Parameter.

See Also
Constant Value: "appliesTo"

public static final String FP_CONTEXT_MENUS

Constant for the name of the contextMenus Formal Parameter.

See Also
Constant Value: "contextMenus"

public static final String FP_CSS_ERROR_MESSAGE

This constant is deprecated.
The css class to use cannot be controlled through a formal parameter anymore.

Constant for the name of the imgWait Formal Parameter.

See Also
Constant Value: "globalCssErrorMessage"

public static final String FP_CSS_ERROR_TITLE

This constant is deprecated.
The css class to use cannot be controlled through a formal parameter anymore.

Constant for the name of the globalCssErrorTitle Formal Parameter.

Constant Value: "globalCssErrorTitle"

public static final String FP_CSS_FILE

Constant for the name of the cssFile Formal Parameter.

See Also
Constant Value: "cssFile"

public static final String FP_CSS_PREFIX

Constant for the name of the cssPrefix Formal Parameter.

See Also
Constant Value: "cssPrefix"

public static final String FP_DEBUG_ERROR_FLAGS

Constant for the name of the debugErrorFlags Formal Parameter.

See Also
Constant Value: "debugErrorFlags"

public static final String FP_DEBUG_FLAGS

Constant for the name of the debugFlags Formal Parameter.

See Also
Constant Value: "debugFlags"

public static final String FP_DRAG_MODE

Constant for the name of the dragMode Formal Parameter.

See Also
Constant Value: "dragMode"

public static final String FP_EXTRA_INPUT

Constant for the name of the extraInput Formal Parameter.

See Also
Constant Value: "extraInput"

public static final String FP_EXTRA_URL

Constant for the name of the extraUrl Formal Parameter.

See Also
Constant Value: "extraUrl"

public static final String FP_HEIGHT

Constant for the name of the height Formal Parameter.

See Also
Constant Value: "height"

public static final String FP_IFRAME_ENABLED

Constant for the name of the iframeEnabled Formal Parameter.

See Also
Constant Value: "iframeEnabled"

public static final String FP_IMG_WAIT

This constant is deprecated.
The wait image is generated using css.

Constant for the name of the imgWait Formal Parameter.

See Also
Constant Value: "imgWait"

public static final String FP_INITIAL_INDENT

This constant is deprecated.
Indentation is not generated by Transforms anymore.

Constant for the name of the initialIndent Formal Parameter.

See Also
Constant Value: "initialIndent"

public static final String FP_ORIENTATION

Constant for the name of the orientation Formal Parameter.

See Also
Constant Value: "orientation"

public static final String FP_ORIENTATIONS_ALLOWED

Constant for the name of the orientationsAllowed Formal Parameter.

Constant Value: "orientationsAllowed"

public static final String FP_PARTIAL_IFRAME_UPDATE

Constant for the name of the partialIframeUpdate Formal Parameter.

Constant Value: "partialIframeUpdate"

public static final String FP_PROCESSING_BUTTONS_FLAGS

Constant for the name of the processingButtonsFlags Formal Parameter.

Constant Value: "processingButtonsFlags"

public static final String FP_PROCESSING_INFO_FLAGS

Constant for the name of the processingButtonsFlags Formal Parameter.

Constant Value: "processingInfoFlags"

public static final String FP_RESIZE_LEVEL

Constant for the name of the resizeLevel Formal Parameter.

See Also
Constant Value: "resizeLevel"

public static final String FP_SCRIPT_CLASS

Constant for the name of the scriptClass formal parameter.

See Also
Constant Value: "scriptClass"

public static final String FP_TYPE

Constant for the name of the type Formal Parameter.

See Also
Constant Value: "type"

public static final String FP_USE_DHTML

Constant Value: "useDHTML"

public static final String FP_WIDTH

Constant for the name of the width Formal Parameter.

See Also
Constant Value: "width"

public static final int PROCESSING_BUTTONS_ALL

Allowed value for the processingButtonsFlags formal parameter. Convenience flag that includes all possible processing buttons values.
Value = 16777215

Constant Value: -1 (0xffffffff)

public static final int PROCESSING_BUTTONS_CANCEL

Allowed value for the processingButtonsFlags formal parameter. Specifies that the Cancel button will be displayed on the wait page.
Value = 2

Constant Value: 2 (0x00000002)

public static final int PROCESSING_BUTTONS_HISTORY_LIST

Allowed value for the processingButtonsFlags formal parameter. Specifies that the History List button will be displayed on the wait page.
It is only displayed if the displayed object (i.e. report) can be added to the History List. Privilege validation will be done as well
Value = 4

Constant Value: 4 (0x00000004)

public static final int PROCESSING_BUTTONS_REFRESH

Allowed value for the processingButtonsFlags formal parameter. Specifies that the Refresh button will be displayed on the wait page.
Value = 1

Constant Value: 1 (0x00000001)

public static final int PROCESSING_BUTTONS_VIEW_DETAILS

Allowed value for the processingButtonsFlags formal parameter. Specifies that the View Details button will be displayed on the wait page.
Value = 8

Constant Value: 8 (0x00000008)

public static final int PROCESSING_INFO_ALL

Allowed value for the processingInfoFlags formal parameter. Convenience flag that includes all possible information values.
Value = 16777215

Constant Value: -1 (0xffffffff)

public static final int PROCESSING_INFO_DESCRIPTION

Allowed value for the processingInfoFlags formal parameter. Specifies that the description of the object will be displayed on the wait page.
Value = 2

Constant Value: 2 (0x00000002)

public static final int PROCESSING_INFO_LAST_UPDATE

Allowed value for the processingInfoFlags formal parameter. Specifies that the last update time of the object will be displayed on the wait page.
Value = 8

Constant Value: 8 (0x00000008)

public static final int PROCESSING_INFO_NAME

Allowed value for the processingInfoFlags formal parameter. Specifies that the name of the object will be displayed on the wait page.
Value = 1

Constant Value: 1 (0x00000001)

public static final int PROCESSING_INFO_NONE

Allowed value for the processingInfoFlags formal parameter. Convenience flag that includes no information values.
Value = 0

Constant Value: 0 (0x00000000)

public static final int PROCESSING_INFO_STATUS

Allowed value for the processingInfoFlags formal parameter. Specifies that the status of the object will be displayed on the wait page.
Value = 4

Constant Value: 4 (0x00000004)

public static final int RESIZE_ALL

Constant to indicate that the component can be resized both, horizontally and vertically. Used with the resizeLevel Formal Parameter.
Value: 3.

See Also
Constant Value: 255 (0x000000ff)

public static final int RESIZE_HORIZONTAL

Constant to indicate that the component can be resized horizontally. Used with the resizeLevel Formal Parameter.
Value: 2.

See Also
Constant Value: 2 (0x00000002)

public static final int RESIZE_NONE

Constant to indicate that the component cannot be resized. Used with the resizeLevel Formal Parameter.
Value: 0.

See Also
Constant Value: 0 (0x00000000)

public static final int RESIZE_VERTICAL

Constant to indicate that the component can be resized vertically. Used with the resizeLevel Formal Parameter.
Value: 2.

See Also
Constant Value: 1 (0x00000001)

Fields

protected final String CLASS_INPUT

This field is deprecated.
This property is not used anymore by the transform.

CSS-Class name used for <input> tags.

Constant Value: "input"

protected final String CLASS_MESSAGE

This field is deprecated.
This property is not used anymore by the transform.

CSS-Class name used for messages.

Constant Value: "message"

protected WebComponent _bean

Instance of WebComponent being transformed.

protected ComponentBlock _componentBlock

protected String _cssPrefix

Property corresponding to the value of the cssPrefix formal parameter

protected String _imgBlank

Field that containts the URL location of a blank image (used as the source of most <IMG> tags as the real URL is specified through css).

protected String _imgWait

This field is deprecated.
This value is not used anymore by the Transform as the wait image is included using css.

Property corresponding to the value of the imgWait formal parameter

See Also

protected MarkupOutput _selfOutput

This field is deprecated.
this field is no longer used since partial update blocks are now generated via ComponentBlock

protected MarkupOutput _subOutput

This field is deprecated.
this field is no longer used since partial update blocks are now generated via ComponentBlock

public FormalParameter appliesTo

This parameter informs the javascript the id of the bone the actions of this component applies to. For example, action of a Toolbar will be applied to the "grid" bone (in the Report page), or the the rwb_viewer (in the document's page).

Possible values for this property are bone ids, its usage depends on the page.

public FormalParameter contextMenus

This formal parameter is used by the Transform to identify the context-menus definition. The value of this parameter can specify either:

  1. The name of a <menu> defined in the pageConfig
  2. The path of an xml file with the context-menu definition

In both cases the xml defines the context-menus using <shortcut-list-set> tags. A <shortcut-list-set> represents a collection of <shortcut-list> tags. Each <shortcut-list> represents a single context-menu. Each <shortcut> represents a single option. Users can add/remove/modify <shortcut> to control the options displayed to the end user.

public FormalParameter cssFile

CSS file that includes the style definition.
If defined, this file will be included as Link.

public FormalParameter cssPrefix

Prefix to append to all css class names.

public FormalParameter debugErrorFlags

Indicates which extra debug information to include in case of an error.
The flags are taken from the EnumWebAppDebugFlags enumeration.

public FormalParameter debugFlags

Indicates which debug information to include.
The flags are taken from the EnumWebAppDebugFlags enumeration.

public FormalParameter dragMode

Indicates the drag mode that the component to render will have.
Usage:
This tells us if the dialog can be dragged or docked (or both). Possible values for this property and their meaning include:

  • 1 = can be dragged freely (floating)
  • 2 = can be docked
  • 3 = 1 + 2 (can be dragged freely & docked)

  • public FormalParameter extraInput

    Indicates any extra inputs to be included in the forms generated by the transform.

    public FormalParameter extraUrl

    Indicates any extra parameters to be included in the links generated by the transform.

    public FormalParameter globalCssErrorMessage

    This field is deprecated.
    The css class to use cannot be controlled through a formal parameter anymore.

    CSS to be used in all error messages.

    public FormalParameter globalCssErrorTitle

    This field is deprecated.
    The css class to use cannot be controlled through a formal parameter anymore.

    CSS to be used in all Error titles.

    public FormalParameter height

    Indicates the default height of the component. If this is not a resizable component, this is the height used. If if it resizable, though, the user might change its width using javascript and the value is saved in a preference; thereafter the Transform will use this new value for this component.

    public FormalParameter iframeEnabled

    Indicates whether the transform supports iframe manipulations.

    public FormalParameter imgWait

    This field is deprecated.
    This value is not used anymore by the Transform as the wait image is included using css.

    Name of the image for the Processing icon on the Wait page.
    Allowed Values:
    The value to indicate should be a valid image file name, with any necessary path information not included already on the resourcesFolderImage application configuration parameter.

    protected int indent

    This field is deprecated.
    Indentation is not appended by Transforms anymore. Although it provided a somewhat better looking HTML source, it also affected performance by increasing the HTML size.

    Returns the current indentation to use when writing a new line of HTML.

    public FormalParameter initialIndent

    This field is deprecated.
    Indentation is not appended by Transforms anymore. Although it provided a somewhat better looking HTML source, it also affected performance by increasing the HTML size.

    Indicates the initial indentation of the HTML generated.

    protected boolean isDHTML

    This field is deprecated.
    Use isDhtml().

    Returns true if using DHTML. This values is initialized based on the bean's OutputFormat() method.

    public FormalParameter orientation

    Indicates the orientation the dialog to render will have.
    Usage:
    Possible values for this property and their meaning include:

  • 0 = not docked
  • 1 = docked horizontally
  • 2 = docked vertically

  • public FormalParameter orientationsAllowed

    Indicates the orientation modes allowed for the dialog to render.
    Usage:
    Possible values for this property and their meaning include:

  • 0 = no orientations allowed
  • 1 = horizontal orientation allowed
  • 2 = vertical orientation allowed
  • 3 = 1 + 2 (both horiz & vert orientations are allowed)

  • public FormalParameter partialIframeUpdate

    This formal parameter specifies whether we should replace the whole contentst of the div shell (outerHTML) or the just the inner contents (innerHTML) of that shell div for the transform when the iframe update is going on. This is typically set to true for pop up editors so that we do not get a screen flash during which the editor partially disappears when doing an irfame manipulation in the edior.

    Possible values for this property are true or false.

    public FormalParameter processingButtonsFlags

    Indicates which buttons to include on the wait page.
    The possible values are:
    - PROCESSING_BUTTONS_REFRESH
    - PROCESSING_BUTTONS_CANCEL
    - PROCESSING_BUTTONS_HISTORY_LIST
    - PROCESSING_BUTTONS_VIEW_DETAILS

    public FormalParameter processingInfoFlags

    Indicates which information to include on the wait page.
    The possible values are:
    - PROCESSING_INFO_NAME
    - PROCESSING_INFO_DESCRIPTION
    - PROCESSING_INFO_STATUS

    public FormalParameter resizeLevel

    Indicates whether the component can be resized vertically/horizontally or both or none. Possible values are RESIZE_NONE, RESIZE_VERTICAL, RESIZE_HORIZONTAL, RESIZE_ALL

    public FormalParameter scriptClass

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

    public FormalParameter type

    This parameter is used when the output of this Transform generates a corresponding Microstrategy bone in the page, and it informs the javascript the type of bone it is. For example, action of a Toolbar will be applied to the "grid" bone (in the Report page), or the the rwb_viewer (in the document's page).

    Possible values for this property are bone ids, its usage depends on the page.

    public FormalParameter useDHTML

    Indicates whether to use DHTML on the output.
    If not set, the bean's OutputFormat() method will be used.

    public FormalParameter width

    Indicates the default width of the component. If this is not a resizable component, this is the width used. If if it resizable, though, the user might change its width using javascript and the value is saved in a preference; thereafter the Transform will use this new value for this component.

    Public Constructors

    public AbstractAppTransform ()

    Default no-args constructor, initializes formal parameters.

    Public Methods

    public String addContactInfo (String message)

    This method is deprecated.
    this function is not used anymore.

    Returns the administrator contact info as defined in the EnumWebPreferences.WebPreferenceAdminInfo preferences, along with the original message. If the preference is null or the beanContext is not set, it returns only the original string.

    Parameters
    message The message to be displayed along with the admin contact information
    Returns
    • The admin contact info.

    public FormalParameter addFormalParameter (String name, int type, Object defaultValue, String description)

    Adds a formal parameter for this transform with the given information

    Parameters
    name the name of the formal parameter
    type the type of the formal parameter, as defined in the FormalParameter constants.
    defaultValue the default value
    description Description of the FP, to use by the style catalog.
    Returns
    • the FormalParameter created.

    public Map getAttributesShellDiv ()

    Returns a Map with the list of attributes that the shell div must use. The shell is the main div surrounding the Transform's output.
    This method can be overriden in case the subclass would like to add or change the value of attributes in the shell.

    public String getDateFormat ()

    public MarkupOutput getDebugOut (int debugFlags)

    Get the Debug Information into the output

    Parameters
    debugFlags an integer of the debugFlags
    Returns

    public String getDescriptor (int key)

    Get the descriptor for the given key.

    By default this method appends the prefix mstrWeb. to the key to find the resources in the Messages bundle. To find a descriptor for a specific key you might use getDescriptor(String).

    If a descriptor is not found for the given key it returns [na]

    Parameters
    key input key as an int, for example, 1
    Returns
    • descriptor as a String corresponding to the key sent in as parameter, for example, Home

    public String getDescriptor (String key)

    Get the descriptor for the given key.

    The key is searched exactly as given in the Messages bundle.

    If a descriptor is not found for the given key it returns [na]

    Parameters
    key input key as a String, for example, mstrWeb.1 *
    Returns
    • descriptor as a String corresponding to the key sent in as parameter, for example, Home.

    public String getDescriptor (String key, String defaultDescriptor)

    public String getDisplayMode ()

    get the display mode used when the GuiComponent renders itself

    Returns
    • the display mode

    public String getDisplayName (WebObjectInfo object)

    public String getErrorMessage (int errorCode, String defaultMessage)

    Returns the error message for the transform, based on the exception. By default returns:

     getDescriptor(640) + " " + getDescriptor(641) + "
    "; //Descriptors: Your request could not be processed due to a server error. | Please try again. If the error persists, contact the server administrator.

    Parameters
    errorCode The error code for which we need the error message
    defaultMessage the default error message to be shown
    Returns
    • The error message.

    public String getErrorMessage (Exception e)

    Returns the error message for the transform, based on the exception. By default returns the exception localized message. If the exception is null, returns the error description for the errorCode 0.

    Parameters
    e Exception that generated the error
    Returns
    • The error message.

    public String getErrorTitle (Exception e)

    Returns the error title for the transform, based on the exception. If the exception is of type MSTRCheckedException, then it returns the error based on the errorCode, if not returns the Descriptor 1167 (An error has occurred on this page.)

    Parameters
    e Exception that generated the error
    Returns
    • The title for the error message.

    public String getErrorTitle (int errorCode)

    Returns the error title for the transform, based on the errorCode. By default returns Descriptor 1167 (An error has occurred on this page.)

    Parameters
    errorCode The error code for which we need the error title
    Returns
    • The title for the error message.

    public EventManager getEventManager ()

    Convenience method for obtaining the EventManager instance associated with this transform

    Returns

    public int getFirstDayOfWeek ()

    public String getHelpPath ()

    Returns the help path for the help type of user.

    Returns
    • String

    public String getID ()

    Returns the unique name of the component to be used as the ID for its shell. This id is used for updating the page using the iFrame technology, and as the id for the corresponding bone (if any).

    Returns
    • the component's unique id

    public static Locale getLocale (AppContext appCtx, boolean isNumberDate, Locale defaultLocale)

    public String getPreferenceValue (String preferenceName)

    Convenience method that returns the value of a preference. If preferences are not available (in case, for example, the Transform is used outside Microstrategy Web), it returns an empty string.

    Parameters
    preferenceName name of the preference
    Returns
    • the value of the preference if available, an empty string otherwise.

    public String getResourcesFolder (String folderType)

    Maps the AppContext's getResourceFolder method, but it validates that the getBeanContext is indeed an AppContext.

    Parameters
    folderType the folder type
    Returns
    • AppContext's getResourceFolder, or "" if not defined.

    public String getStyleShellDiv ()

    Returns the style (that is, the style attribute used for css formatting) of the shell's div.

    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 TagsFactory getTagsFactory ()

    Convenience method for obtaining an instance of the TagsFactory class.

    Returns

    public String getTimeFormat ()

    public WebBeanError getWebBeanErrorInfo ()

    Returns
    • the error info

    public boolean hasSubBlock ()

    This method is deprecated.
    this method is no longer used

    the boolean indicates whether this transform will utput pure html or an array of sub json blocks to update itself

    Returns
    • boolean true if it contains sub json blocks false if pure html is sent as content

    public void initializeCss ()

    Initialize the css classes to be used by this transform.

    public void initializeImages ()

    Initialize the images to be used by this transform.

    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 void initializeWebComponent (Transformable data)

    Initialize the web component to be used by the transform.

    Parameters
    data the bean to transform.

    public boolean is508 ()

    Determine if the environment where this transform instance is being used is DHTML or not

    Returns
    • boolean value indicating the environment is 508 mode.

    public boolean isContextMenusEnabled ()

    Indicates whether context-menus are enabled for this Transform. By default context-menus are enabled only if the contextMenus formal parameter has been set.

    Returns
    • true if context-menus are enabled in this Transform.

    public boolean isDhtml ()

    Determine if the environment where this transform instance is being used is DHTML or not

    Returns
    • boolean value indicating the environment is DHTML or not.

    public boolean isDormant ()

    public boolean isFeatureAvailable (String feature)

    Convenience method. Maps the isFeatureAvailable method of the Bean currently bean Transformed.

    Parameters
    feature the feature Id.
    Returns
    • true by default, or whatever _bean.isFeatureAvailable(feature) returns;

    public boolean isIFrameDisplayMode ()

    Determines if the display mode should consider iframe request or not. A sample application of this logic will be to determine if the COMMENT HTML tags have to be generated in order for the response to be processed correctly by the iframe in the page. If the logic is to be specialized for the application, please overwrite localIsIFrameDisplayMode().

    Returns
    • boolean value indicating if the display mode of this transform should be generated for iframe manipulation or not

    public boolean isIFrameRequest ()

    Return true if the current request was generated from an iFrame update. Transform might need to generate different output whenever the content shall be generated inside the iFrame.
    To identify if it's an iFrame request, this method checks for the an iframe parameter in the request keys. This might change in the future.

    Returns
    • boolean true if this is an iframe request.

    public boolean isJobExpired (int errorCode)

    Determines, based on the errorCode, if the error is because the message has expired in the iServer.

    Parameters
    errorCode the error's id
    Returns
    • true, if the error is related to the fact that the Job expired.

    public boolean isPortlet ()

    Indicates web page is used as a portlet.

    Returns
    • A boolean value indicates whether web page is used as a portlet.

    public void renderBean (MarkupOutput out, String name)

    Renders any bean within the hierachy using its default style

    Parameters
    out MarkupOutput instance
    name the name of the bean to render

    public void renderBean (MarkupOutput out, String name, String style)

    Renders any bean within the hierachy using the specified style

    Parameters
    out MarkupOutput instance
    name the name of the bean to render
    style the name of the style to user to render the bean

    public void renderBlockEnd (MarkupOutput out)

    This method is deprecated.
    this method is no longer used. We now create ComponentBlock to render a component block in json

    Render the ending part of a json block

    Parameters
    out the MarkupOutput instance that will record the rendering stream

    public void renderBlockStart (MarkupOutput out, String blockId, Map<String, String> attrs)

    This method is deprecated.
    this method is no longer used. We now create ComponentBlock to render a component block in json

    Render the starting part of a json block

    Parameters
    out the MarkupOutput instance that will record the rendering stream
    blockId the id of the json block
    attrs other scalar attributs of the json block to be rendered

    public void renderCssLink (MarkupOutput out)

    Generates a LINK tag in pointing to the name of the file as controlled through the cssFile formal parameter. If the value of this parameter is empty, the Link is not rendered.

    Parameters
    out output by this transform

    public void renderDescriptor (MarkupOutput out, int key)

    Generates the string associted with a descriptor in the given MarkupOutput. This method is useful when using layouts-xml to include a string that needs to be localized.

    Parameters
    out MarkupOutput instance where to save the HTML contents generated by this method.
    key input key as an int, it will append the "mstrWeb" namespace so for example, 1, will be interpreted as mstrWeb.1 which will append Home to the output instance. *

    public void renderDescriptor (MarkupOutput out, String key)

    Generates the string associted with a descriptor in the given MarkupOutput. This method is useful when using layouts-xml to include a string that needs to be localized.

    Parameters
    out MarkupOutput instance where to save the HTML contents generated by this method.
    key input key as a String, for example, mstrWeb.1, which will append Home to the output instance.

    public void renderErrorButton (MarkupOutput out)

    Renders the reexecute event button Transfrom will override it if necessary

    public void renderHiddenInputFromRequest (MarkupOutput out, String name)

    Renders a hidden input if the name is found on the request keys.
    It renders nothing if not found.

    Parameters
    out output by this transform
    name the name of the input to render

    public void renderImage (MarkupOutput out, String image)

    Renders a transform's image

    Parameters
    out where to write the output of the method.
    image the image name

    public void renderProcessingButtons (MarkupOutput out)

    Renders the buttons displayed to the end user when the request is still processing (for example, in the wait page). By default renders a "Check Status" button, associated with a EnumPageEvents.WebEventRefresh event, and a "Cancel this Request" buttons associated with a EnumServletEvents.WebEventCancel event.

    Parameters
    out output by this transform

    public void renderProcessingInfo (MarkupOutput out)

    Generates the the information about the execution when the request is still processing (for example, in the wait page).
    By default, it calls renderProcessingInfoTitle which displays a message informating the user that the request is still executing, then it calls renderProcessingInfoImage and then calls renderProcessingInfoData to include the object's name.
    Subclasses might include their own processing information by extending this method and calling renderProcessingInfoData with their own data, for example:

     public void renderProcessingInfo(MarkupOutput out) {
         super.renderProcessingInfo(out);
    
         Date d = new Time();
         renderProcessingInfoData(out, "Current time: ", d.toString());
     }
     

    Parameters
    out output by this transform

    public void renderProcessingInfoImage (MarkupOutput out)

    Generates the image on the wait page. This method just renders the div as a container for the image - the image is specified in the pageWait.css

    public void renderProcessingInfoSubtitle (MarkupOutput out)

    Generated the message "Please wait or choose one of the following actions"

    public void renderSelf (MarkupOutput out, String style)

    Renders the bean associated with this transform ("self") using the specified style.

    Parameters
    out The MarkupOutput instance to render into.
    style The name of the style to render this bean.

    public void renderShell (MarkupOutput out)

    Generates the shell for this Transform.

    The shell is a <div> tag that automatically surrounds the content generated by the Transform. It's used among other things by the javascript to identify the HTML associated with a bone, and by the iFrame update technology to identify a component in the page.

    The attributes to append to this <div> are obtained from the getAttributesShellDiv method; the style from the getStyleShellDiv method.
    This method calls renderCssLink and checkStatus to generate the Transform's content.

    Parameters
    out output by this transform

    public boolean renderSubBlock ()

    the boolean indicates whether this GuiComponent allows sub json blocks to update or just pure HTML

    Returns
    • the boolean flag

    public void renderUserHelpAnchor (MarkupOutput out, String name)

    public void setDisplayMode (String value)

    set the display mode used when the GuiComponent renders itself

    Parameters
    value String the display mode: DISPLAY_MODE_HTML - plain HTML DISPLAY_MODE_JSON - the output will be wrapped up in a json structure in form of {id: id of the component, content: html content to be updated} or {id: if of the component, components: sub json blocks}

    public void setHasSubBlock (boolean newValue)

    set the flag to signal whether this transform will output pure html or an array of sub json blocks to update itself

    Parameters
    newValue boolean true if it contains sub json blocks false if pure html is sent as content

    public void setIFrameDisplayMode (boolean value)

    Determines if the display mode should consider iframe request or not. A sample application of this logic will be to determine if the COMMENT HTML tags have to be generated in order for the response to be processed correctly by the iframe in the page.

    Parameters
    value boolean indicating if the display mode of this transform should be generated for iframe manipulation or not

    public void setIsDormant (boolean isDormant)

    Tells the transform whether the bone is dormant or not, in which case it should not receive event notification.

    Parameters
    isDormant boolean

    public void setRenderSubBlock (boolean newValue)

    set the flag to signal whether this GuiComponent allows sub json blocks to render so that partial update happens within the original GuiComponent

    Parameters
    newValue boolean true if it allows sub json blocks' existence false if only plain HTML will be output as content

    public void setShellAttributeOnClosedComponent (HashMap __result)

    public final void transform (Transformable data, MarkupOutput out)

    Transform the data into output. This method will call in order:

    1. initializeTransform(Transformable) to initialize internal data strucutures.
    2. renderShell(MarkupOutput) the entry point to generate the output.
    3. #renderDebugInfo to generate debug information as required.

    Parameters
    data the bean to transform
    out output by this transform

    public void transformForRequestCanceled (MarkupOutput out)

    Generates the output when the bean's status is WebBeanRequestCanceled. It simply displays an error message.
    Transforms that would like to generate customized error message for this scenario should extend this method.

    Parameters
    out output by this transform

    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 transformForRequestNotInited (MarkupOutput out)

    Generates the output when the bean's status is WebBeanRequestNotInitiated. This method by default generates no output.
    Transforms that would like to generate customized error message for this scenario should extend this method.

    Parameters
    out output by this transform

    public void transformForRequestProcessing (MarkupOutput out)

    Generates the output when the bean's status is WebBeanRequestProcessing. This is the case when the iServer is still executing the request and a wait page is displayed to the end user.
    This method generates the default wait page contents. It calls renderProcessingInfo and renderProcessingButtons.

    Parameters
    out output by this transform

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

    public void transformForRequestWaitingForUserInput (MarkupOutput out)

    Generates the output when the bean's status is WebBeanRequestWaitingForUserInput, that is when the bean needs to answer prompts. By default it just generates an error message.
    Usually prompts are handled by a Prompts transform, the bean is responsible to delegate execution to this transform when prompts are open so reaching this method is actually considered an error.
    Transforms that would like to generate customized error message for this scenario should extend this method.

    Parameters
    out output by this transform

    Protected Methods

    protected void addDynamicScriptClass (String jsClassName)

    Add the script dependency based on the JavaScript class.

    Parameters
    jsClassName class name to add as a dependency.

    protected void addDynamicScriptFile (String file, String key)

    Adds a javascript file that the Transform requires for its correct behavior. The list of files (and their corresponding keys) are saved by the Transform and they are automatically included by the renderJavascript method.
    For example, by default the AbstractEditorTransform adds the 'editor.js' file to this list, so Transforms do not need to manually added. If a Transform uses yet another javascript file it should add it in its initializeTransform method.

    Parameters
    file the file name (including all relative paths).
    key the unique key for this file (to identify it has been loaded).

    protected boolean checkLevel (int level, FormalParameter parameter)

    This a helper methoc that will check if the level parameter value contains this flag.
    It will check if the bit corresponding to level is on in the Formal Parameter parameter.
    This method expects parameter to be of type Integer.

    Parameters
    level level flag
    parameter formal parameter
    Returns
    • true means the level flag is included in the level parameter value

    protected boolean checkProcessingButtonsFlag (int flag)

    protected boolean checkProcessingInfoFlag (int flag)

    protected void checkStatus (MarkupOutput out)

    Parameters
    out output by this transform

    protected void displayError (MarkupOutput out, String className, String methodName, Exception e, String title, String message)

    Generates an error message to the end user. This is the main entry point when the Transform catches an Exception and the error needs to be displayed to the end user. The title and message to display are received as parameters for this method.
    Transforms that would like to generate customized error messages may extend this method.

    Parameters
    out output by this transform
    className the class where the error was originated
    methodName the method where the error was originated
    e the Exception caught that caused the error
    title the title for the error message
    message the error message to display

    protected void displayError (MarkupOutput out, String className, String methodName, Exception e, String title, String message, boolean addContactInfo)

    Generates an error message to the end user. This is the main entry point when the Transform catches an Exception and the error needs to be displayed to the end user. The title and message to display are received as parameters for this method. It also receives an argument specifying if the administrator's contact information should be included in the error message.
    Transforms that would like to generate customized error messages may extend this method.

    Parameters
    out output by this transform
    className the class where the error was originated
    methodName the method where the error was originated
    e the Exception caught that caused the error
    title the title for the error message
    message the error message to display
    addContactInfo if the administrator's contact info should be included or not.

    protected void displayError (MarkupOutput out, String className, String methodName, Exception e)

    Generates an error message to the end user. This is the main entry point when the Transform catches an Exception and the error needs to be displayed to the end user. The error title and error message are calculated based on the exception from the getErrorTitle and getErrorMessage methods accordingly
    Transforms that would like to generate customized error messages may extend this method.

    Parameters
    out output by this transform
    className the class where the error was originated
    methodName the method where the error was originated
    e the Exception caught that caused the error

    protected String emptyCell ()

    Convenience method that checks if the output format is SCREEN_READER and determines whether to show a " " or HTMLHelper.SCREEN_READER_EMPTY_CELL_DISPLAY.

    Returns
    • The string representing the empty cell

    protected boolean excludeStaticTags ()

    Indicates if a layout transformation will include or exclude static code defined in the layout file.

    Returns
    • False by default, so static tags are not included

    protected AnchorTag generateAnchor (WebEvent event)

    Creates an <a> tag from the EventManager.

    Parameters
    event the WebEvent to generate the link with the request
    Returns
    • AnchorTag instance initialized with the information from the event

    protected AnchorTag generateAnchorForExport (WebEvent event)

    Creates an anchor tag to be used especifically for Export requests

    Parameters
    event WebEvent instance to be used for obtaining the information for the anchor
    Returns
    • AnchorTag instance initialized with the information from the event

    protected void generateHiddenInputsForEvent (MarkupOutput out, int eventId)

    protected Tag generateIFrameTag (String name)

    Returns
    • the HTML tag that will be used for handling IFrame requests. Internally, it generates a COMMENT tag which will also include comment markups before content gets appended into it.

    protected AppContext getAppContext ()

    Convenience method that returns the current AppContext. This method might return null if the Transform is used outside Microstrategy Web.

    Returns
    • AppContext instance related with the bean being transformed.

    protected String getArgumentName (WebEvent event, int argumentID)

    For the given event, returns the name of the argument with the given ID. When overriding an specific getEvent method, clients can override this method as well to provide the corresponding argument for the new event.

    Parameters
    event WebEvent from which retrieve the argument
    argumentID argument Id.
    Returns
    • The argument name. By default: event.getArgumentName(argumentID)

    protected String getBeanPath ()

    Returns the path within the application of the WebBean being transformed.
    When submitting an WebEvent, this path allows Microstrategy Web to uniquely identify the location of the bean that needs to handle the event.
    This method is used by the renderRegisterBone method to inform the javascript bone the bean to whom it should send its server-side requests.

    Returns
    • String

    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 WebEvent getCancelEvent ()

    Returns
    • WebEvent instance initialized with the information for cancelling a request

    protected ClientSideHelper getClientSideHelper ()

    Obtain an instance of the ClientSideHelper class

    Returns

    protected ContainerServices getContainerServices ()

    Convenience method to retrieve the connected Container Services object. If anything fails along the way, returns null.

    Returns
    • The ContainerServices instance.

    protected TransformContext getContext ()

    Returns the instance of TransformContext with context information for this Transform.

    protected ContextMenu getContextMenu (String menuName)

    Returns the corresponding context-menu. If a valid contextMenus has been provided, the transform will use it to populate the context-menu, otherwise it will return an empty ContextMenu instance.

    Parameters
    menuName Name of the context-menu

    protected ContextMenuManager getContextMenuManager ()

    Returns the ContextMenuManager instance used by this Transform. This method will return a non-null instance, even if context menus are not enabled for this transform (i.e. if isContextMenusEnabled() returns false).

    protected String getContextMenuManagerName ()

    Returns the name to use for the ContextMenuManager of this Transform. By default, it uses getID() + "_cmm". Transforms may override this method in case they need a different value.

    protected ShortcutListSet getContextMenusDefinition ()

    Returns the definition used to populate the context-menus of this Transform. The definition is stored as a ShortcutListSet and is controlled by the contextMenus FormalParameter.

    Returns
    • ShortcutListSet

    protected String getCssPrefix ()

    protected static float getFloatValue (FormalParameter parameter)

    Returns the float value of a FormalParameter.
    The FormalParameter needs to be of type Float.

    Parameters
    parameter the formal parameter to check
    Returns
    • the Float value of the parameter, 0 if the parameter is invalid.

    protected static int getIntValue (FormalParameter parameter)

    Returns the int value of a FormalParameter.
    The FormalParameter needs to be of type Integer.

    Parameters
    parameter the formal parameter to check
    Returns
    • the intValue() of the parameter, 0 if the parameter is invalid.

    protected String getJSNameSpace ()

    Returns a unique name space used by the getID method as a prefix of the component's id

    Returns
    • the components javascript space name

    protected LayoutContext getLayoutContext (Transformable data, boolean excludeStaticTags)

    Gets the LayoutContext instance to use for any layout processing.

    Parameters
    data The Transformable object we are processing
    excludeStaticTags Whether to exclude static tags.
    Returns

    protected Locale getLocale ()

    Returns number/date locale. Should not be used for messages.

    Returns
    • Locale instance

    protected String getProjectID ()

    Private method that gets the Project ID from the session manager

    Returns
    • String projectID

    protected WebEvent getRefreshEvent ()

    Returns
    • WebEvent instance initialized with the information for refreshing the request

    protected RequestKeys getRequestKeys ()

    If the beanContenxt of the associated bean is an instance of AppContext, the method returns the RequestKeys object associated with it

    Returns

    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 static String getStringValue (FormalParameter parameter)

    Returns the string value of the Formal Paramter.

    Parameters
    parameter the formal parameter to check
    Returns
    • the String value of the parameter

    protected StyleRequestContext getStyleRequestContext (WebComponent webComponent)

    Since the addition of the dynamic style catalog, it was required to pass the Request Context object to obtain a transform.

    Returns
    • StyleRequestContext

    protected String getUnitsLabel (String unitsID)

    Returns the descriptor associated with unit. For example, if unitsID.equals(LocaleInfo.UNIT_CM) it returns "Centimeters" (localized).

    Parameters
    unitsID measure unit. It should be a value from LocaleInfo
    Returns
    • the descriptor for measurement unit.

    protected void initHeightAndWidthFromPreferences ()

    Initializes the _height and _width of this component from the bone dimesions retrieved from Preferences. The format of the preference is : id1:width:heigth@id2:width:height@....

    protected boolean isBlockMode ()

    Helper method indicating whether the transform is in block mode or not

    protected boolean isDialog ()

    Defines whether this Transform should behave as a dialog (for example, a pop-up window).

    Returns
    • true if it's transforming a dialog

    protected boolean isIFrameEnabled ()

    Whether iframe update technology is enabled for this Transform. The iFrame can be disabled either through the iframeEnabled FormalParameter or if the EnumAppWebFeatures.WebFeatureIFrame feature is disabled.

    Returns
    • whether ifram is enabled

    protected boolean isModal ()

    Defines whether this Transform should behave as a modal component (that is, it's displayed on top of the page and while open nothing else can be used).

    Returns
    • true if it's transforming a modal dialog

    protected boolean isOpen ()

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

    Returns
    • true if the bean is visible

    protected static boolean isTrue (FormalParameter parameter)

    Checks for a Boolean FormalParamter and return its booleanValue().

    Parameters
    parameter the formal parameter to check
    Returns
    • true if the parameter is true.

    protected boolean localIsIFrameDisplayMode ()

    Called by isIFrameDisplayMode(), it helps determining if the display mode of this transform should be generated for iframe manipulation or not. Any logic contained in this method has lower priority than the value that could have been assigned via the setIFrameDisplayMode(boolean) method.

    Returns
    • boolean value indicating if the display mode of this transform should be generated for iframe manipulation or not

    protected TransformContext newContext ()

    Creates a new instance of a TransformContext. It's used by the getContext method the first time is invoked. Transforms who require to include extra information in the context should create their own TransformContext implementation (possibly a subclass of AppTransformContext) and returns a new instance in this method.

    protected ParameterBuilder newHiddenInputBuilder ()

    Convenience method to retrieve a new instance of a Hidden Input Builder from the connected Container Services object. If anything fails along the way, returns null.

    Returns
    • The ParameterBuilder instance to use for building Hidden Input strings.

    protected NamespaceEncoder newNamespaceEncoder ()

    Convenience method to retrieve a new instance of a Namespace Encoder from the connected Container Services object. If anything fails along the way, returns null.

    Returns
    • The NamespaceEncoder instance to use for encoding names.

    protected ParameterBuilder newURIBuilder ()

    Convenience method to retrieve a new instance of a URI Builder from the connected Container Services object. If anything fails along the way, returns null.

    Returns
    • The ParameterBuilder instance to use for building URIs.

    protected void redirectToDisplayError (MarkupOutput out, String errorMessage)

    This method is used to jump to a new "Error page" to show error messages.

    protected void renderBean (MarkupOutput out, WebComponent beanToRender, String style)

    Throws
    IllegalArgumentException
    IllegalStateException

    protected void renderBean (MarkupOutput out, WebComponent beanToRender, String style, boolean iframeDisplayMode)

    Throws
    IllegalArgumentException
    IllegalStateException

    protected void renderCancelButton (MarkupOutput out)

    Renders the Cancel button for the wait page.
    It calls getCancelEvent() to obtain the event for the button
    The button is not rendered if:
    - getCancelEvent() returns null
    - processingButtonsFlags does not have PROCESSING_BUTTONS_CANCEL

    Parameters
    out output for this transform
    Throws
    IllegalArgumentException
    IllegalStateException
    UnmodifiableException

    protected void renderContextMenus (MarkupOutput out)

    Generates the HTML necessary to use context-menus with this transform.

    Parameters
    out MarkupOutput whether the output should be rendered.

    protected boolean renderLayout (MarkupOutput out)

    Renders the transform information using layout-xml.
    This method should be called for those Transforms extending LayoutTransform. If a layout-xml was associated with this Transform, the execution will be delegated to the corresponding layout-parser, and this method will return true; otherwise it will return false.
    Transforms calling this method need still to generate output (with the default layout) whenever this method returns false/

    Parameters
    out MarkupOutput whether the output should be rendered.
    Returns
    • boolean value indicating if the layout was used for the display or if it was not found and something else should be done for rendering the transform's output.

    protected void renderProcessingButton (MarkupOutput out, WebEvent event, String buttonDescriptor)

    Renders one button for the Wait page.

    Parameters
    out the output for the transform
    event event for the button
    buttonDescriptor the buton's descriptor

    protected void renderProcessingButton (MarkupOutput out, WebEvent event, String buttonDescriptor, String buttonCSS)

    Renders one button for the Wait page.

    Parameters
    out the output for the transform
    event event for the button
    buttonDescriptor the buton's descriptor

    protected void renderProcessingButtonForGet (MarkupOutput out, WebEvent event, String buttonDescriptor, String buttonCSS)

    Renders one button for the Wait page.

    Parameters
    out the output for the transform
    event event for the button
    buttonDescriptor the buton's descriptor

    protected void renderProcessingInfoData (MarkupOutput out, String propertyName, String propertyValue)

    This method is used in the wait page to generate data about the current execution.
    It recieves the property name and property value that needs to be displayed to the end user.

    Parameters
    out output by this transform
    propertyName name of the property to display as a label about the status of the request
    propertyValue value of the property to display as a label about the status of the request

    protected void renderProcessingInfoTitle (MarkupOutput out)

    Generates the title when the request is still processing (for example, in the wait page).
    By default, it just displays the message:
    Your request has been submitted. Please wait...

    Parameters
    out output by this transform

    protected void renderProcessingObjectName (MarkupOutput out)

    protected void renderRefreshButton (MarkupOutput out)

    Renders the Refresh button for the wait page.
    It calls getRefreshEvent() to obtain the event for the button
    The button is not rendered if:
    - getRefreshEvent() returns null
    - processingButtonsFlags does not have PROCESSING_BUTTONS_REFRESH

    Parameters
    out output for this transform
    Throws
    IllegalArgumentException
    IllegalStateException
    UnmodifiableException

    protected void renderRegisterBone (MarkupOutput out)

    If a scriptClass is specified, this method registers the corresponding javascript bone for this component.

    Parameters
    out MarkupOutput whether the output should be rendered.
    See Also

    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.

    protected void setHeight (String height)

    Registers the height of the component. If set, this is used as this transform shell's height (so the browser will limit the visibility of this component to this height).

    Parameters
    height the width for this component.

    protected void setWidth (String width)

    Registers the width of the component. If set, this is used as this transform shell's width (so the browser will limit the visibility of this component to this width).

    Parameters
    width the width for this component.

    protected boolean shouldDisplay ()

    Determines whether the transform should render itself or not. Returns the result of !isIFrameRequest() or the result of the hasChanged() method.

    Returns
    • boolean