Class AbstractAppTransform
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractTransform
-
- com.microstrategy.web.transform.AbstractLayoutTransform
-
- com.microstrategy.web.app.transforms.AbstractAppTransform
-
- All Implemented Interfaces:
AppTransform
,Transform
- Direct Known Subclasses:
AbstractAdminPathTransform
,AbstractAdminTransform
,AbstractAppWidgetTransform
,AbstractChangePasswordTransform
,AbstractEditorTransform
,AbstractExportTransform
,AbstractMojoTransform
,AbstractObjectInfoListTransform
,AbstractPreferencesTransform
,AbstractPrivilegesEditorTransform
,AbstractPromptEditorTransform
,AbstractSubscriptionEditTransform
,AbstractSubscriptionFolderBeanTransform
,AbstractTabTransform
,AbstractUserEntitiesTreeCartTransform
,AbstractWebBeanTransform
,AddressTransform
,AdvSortDataTransform
,BeanGeneratedOutputTransform
,DataExplorerElementsWidgetTransform
,DataExplorerTransform
,DataImportTransform
,DirectExportTransform
,ElementPickerTransform
,EmptyTransform
,ExportTransform
,ExpressionGenericTransform
,FilterTransform
,FolderQuickSearchTransform
,FrameGenericTransform
,GraphImageTransform
,GridAutoStylesTransform
,InboxClearTransform
,InboxDetailsTransform
,InboxExtrasTransform
,InboxListTransform
,InboxListXHTMLTransform
,LoginContinueTransform
,LoginTransform
,LogoutTransform
,MobileHTMLGridTransform
,ObjectInfoTransform
,ObjectPathTransform
,ObjectSelectorTransform
,ObjectSiblingsTransform
,PageByTransform
,PathTransform
,PDFTransform
,PreferencesToolbarTransform
,PreferencesUserGroupsTransform
,PrintTransform
,ProjectBrowserTransform
,ProjectStatusTransform
,ProjectsTransform
,PromptDetailsTransform
,PromptEditorJavaScriptBoneTransform
,PromptEditorTabTransform
,PromptsClassicTransform
,PromptsContainerTransform
,PromptsSummaryTransform
,ReportDetailsPanelTransform
,ReportExportExcelFormattingTransform
,ReportFrameClassicTransform
,ReportLastUpdateTransform
,ResultSetFrameTransform
,RWLastUpdateTransform
,RWLayoutTabStripTransform
,RWOutlineViewTransform
,RWPDFTransform
,ScheduleOverwriteTransform
,SearchSimpleTransform
,SecurityFilterFrameTransform
,SecurityFilterTransform
,SortGeneralTransform
,SubscriptionContactsBrowserTransform
,SubscriptionFrameTransform
,SubtotalsDHTMLTransform
,TemplateFilterExecTransform
,ToolbarSetTransform
,ToolbarTransform
,UserAnalysisQuotaEditorTransform
,UserContactsBrowserCartTransform
,UserEntityEditorTransform
,ViewFilterElementPanelTransform
,VisualizationPropertiesTransform
,WizardStepTransform
public abstract class AbstractAppTransform extends AbstractLayoutTransform implements AppTransform
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 thetransformForRequestSuccessful
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 methodinitializeTransform(Transformable)
and the methodrenderShell(MarkupOutput)
; all these methods can be overriden by any class extending theAbstractAppTransform
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:- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AbstractAppTransform.Context
This is the implementation of theTransformContext
used by this Transform.
-
Field Summary
Fields Modifier and Type Field Description protected WebComponent
_bean
Instance ofWebComponent
being transformed.protected ComponentBlock
_componentBlock
protected java.lang.String
_cssPrefix
Property corresponding to the value of thecssPrefix
formal parameterprotected java.lang.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 java.lang.String
_imgWait
Deprecated.This value is not used anymore by the Transform as the wait image is included using css.protected MarkupOutput
_selfOutput
Deprecated.this field is no longer used since partial update blocks are now generated viaComponentBlock
protected MarkupOutput
_subOutput
Deprecated.this field is no longer used since partial update blocks are now generated viaComponentBlock
FormalParameter
appliesTo
This parameter informs the javascript the id of the bone the actions of this component applies to.protected java.lang.String
CLASS_INPUT
Deprecated.This property is not used anymore by the transform.protected java.lang.String
CLASS_MESSAGE
Deprecated.This property is not used anymore by the transform.FormalParameter
contextMenus
This formal parameter is used by the Transform to identify the context-menus definition.FormalParameter
cssFile
CSS file that includes the style definition.FormalParameter
cssPrefix
Prefix to append to all css class names.FormalParameter
debugErrorFlags
Indicates which extra debug information to include in case of an error.FormalParameter
debugFlags
Indicates which debug information to include.FormalParameter
dragMode
Indicates the drag mode that the component to render will have.FormalParameter
extraInput
Indicates any extra inputs to be included in the forms generated by the transform.FormalParameter
extraUrl
Indicates any extra parameters to be included in the links generated by the transform.static java.lang.String
FP_APPLIES_TO
Constant for the name of theappliesTo
Formal Parameter.static java.lang.String
FP_CONTEXT_MENUS
Constant for the name of thecontextMenus
Formal Parameter.static java.lang.String
FP_CSS_ERROR_MESSAGE
Deprecated.The css class to use cannot be controlled through a formal parameter anymore.static java.lang.String
FP_CSS_ERROR_TITLE
Deprecated.The css class to use cannot be controlled through a formal parameter anymore.static java.lang.String
FP_CSS_FILE
Constant for the name of thecssFile
Formal Parameter.static java.lang.String
FP_CSS_PREFIX
Constant for the name of thecssPrefix
Formal Parameter.static java.lang.String
FP_DEBUG_ERROR_FLAGS
Constant for the name of thedebugErrorFlags
Formal Parameter.static java.lang.String
FP_DEBUG_FLAGS
Constant for the name of thedebugFlags
Formal Parameter.static java.lang.String
FP_DRAG_MODE
Constant for the name of thedragMode
Formal Parameter.static java.lang.String
FP_EXTRA_INPUT
Constant for the name of theextraInput
Formal Parameter.static java.lang.String
FP_EXTRA_URL
Constant for the name of theextraUrl
Formal Parameter.static java.lang.String
FP_HEIGHT
Constant for the name of theheight
Formal Parameter.static java.lang.String
FP_IFRAME_ENABLED
Constant for the name of theiframeEnabled
Formal Parameter.static java.lang.String
FP_IMG_WAIT
Deprecated.The wait image is generated using css.static java.lang.String
FP_INITIAL_INDENT
Deprecated.Indentation is not generated by Transforms anymore.static java.lang.String
FP_ORIENTATION
Constant for the name of theorientation
Formal Parameter.static java.lang.String
FP_ORIENTATIONS_ALLOWED
Constant for the name of theorientationsAllowed
Formal Parameter.static java.lang.String
FP_PARTIAL_IFRAME_UPDATE
Constant for the name of thepartialIframeUpdate
Formal Parameter.static java.lang.String
FP_PROCESSING_BUTTONS_FLAGS
Constant for the name of theprocessingButtonsFlags
Formal Parameter.static java.lang.String
FP_PROCESSING_INFO_FLAGS
Constant for the name of theprocessingButtonsFlags
Formal Parameter.static java.lang.String
FP_RESIZE_LEVEL
Constant for the name of theresizeLevel
Formal Parameter.static java.lang.String
FP_SCRIPT_CLASS
Constant for the name of thescriptClass
formal parameter.static java.lang.String
FP_TYPE
Constant for the name of thetype
Formal Parameter.static java.lang.String
FP_USE_DHTML
static java.lang.String
FP_WIDTH
Constant for the name of thewidth
Formal Parameter.FormalParameter
globalCssErrorMessage
Deprecated.The css class to use cannot be controlled through a formal parameter anymore.FormalParameter
globalCssErrorTitle
Deprecated.The css class to use cannot be controlled through a formal parameter anymore.FormalParameter
height
Indicates the default height of the component.FormalParameter
iframeEnabled
Indicates whether the transform supports iframe manipulations.FormalParameter
imgWait
Deprecated.This value is not used anymore by the Transform as the wait image is included using css.protected int
indent
Deprecated.Indentation is not appended by Transforms anymore.FormalParameter
initialIndent
Deprecated.Indentation is not appended by Transforms anymore.protected boolean
isDHTML
Deprecated.UseisDhtml()
.FormalParameter
orientation
Indicates the orientation the dialog to render will have.FormalParameter
orientationsAllowed
Indicates the orientation modes allowed for the dialog to render.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.static int
PROCESSING_BUTTONS_ALL
Allowed value for theprocessingButtonsFlags
formal parameter.static int
PROCESSING_BUTTONS_CANCEL
Allowed value for theprocessingButtonsFlags
formal parameter.static int
PROCESSING_BUTTONS_HISTORY_LIST
Allowed value for theprocessingButtonsFlags
formal parameter.static int
PROCESSING_BUTTONS_REFRESH
Allowed value for theprocessingButtonsFlags
formal parameter.static int
PROCESSING_BUTTONS_VIEW_DETAILS
Allowed value for theprocessingButtonsFlags
formal parameter.static int
PROCESSING_INFO_ALL
Allowed value for theprocessingInfoFlags
formal parameter.static int
PROCESSING_INFO_DESCRIPTION
Allowed value for theprocessingInfoFlags
formal parameter.static int
PROCESSING_INFO_LAST_UPDATE
Allowed value for theprocessingInfoFlags
formal parameter.static int
PROCESSING_INFO_NAME
Allowed value for theprocessingInfoFlags
formal parameter.static int
PROCESSING_INFO_NONE
Allowed value for theprocessingInfoFlags
formal parameter.static int
PROCESSING_INFO_STATUS
Allowed value for theprocessingInfoFlags
formal parameter.FormalParameter
processingButtonsFlags
Indicates which buttons to include on the wait page.FormalParameter
processingInfoFlags
Indicates which information to include on the wait page.static int
RESIZE_ALL
Constant to indicate that the component can be resized both, horizontally and vertically.static int
RESIZE_HORIZONTAL
Constant to indicate that the component can be resized horizontally.static int
RESIZE_NONE
Constant to indicate that the component cannot be resized.static int
RESIZE_VERTICAL
Constant to indicate that the component can be resized vertically.FormalParameter
resizeLevel
Indicates whether the component can be resized vertically/horizontally or both or none.FormalParameter
scriptClass
Holds the name of the javaScript class (if any) to be associated with the component.protected static ScriptVariableJSONEncoder
scriptEndTagEncoder
reference to encoder that deals with tag encodingFormalParameter
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.FormalParameter
useDHTML
Indicates whether to use DHTML on the output.FormalParameter
width
Indicates the default width of the component.
-
Constructor Summary
Constructors Constructor Description AbstractAppTransform()
Default no-args constructor, initializes formal parameters.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
addContactInfo(java.lang.String message)
Deprecated.this function is not used anymore.protected void
addDynamicScriptClass(java.lang.String jsClassName)
Add the script dependency based on the JavaScript class.protected void
addDynamicScriptFile(java.lang.String file, java.lang.String key)
Adds a javascript file that the Transform requires for its correct behavior.FormalParameter
addFormalParameter(java.lang.String name, int type, java.lang.Object defaultValue, java.lang.String description)
Adds a formal parameter for this transform with the given informationprotected boolean
checkLevel(int level, FormalParameter parameter)
This a helper methoc that will check if the level parameter value contains this flag.protected boolean
checkProcessingButtonsFlag(int flag)
protected boolean
checkProcessingInfoFlag(int flag)
protected void
checkStatus(MarkupOutput out)
Once the shell is rendered, this method checks the bean'sgetXMLStatus
and calls the corresponding transform method, based on its value:transformForRequestCanceled(MarkupOutput)
transformForRequestInError(MarkupOutput)
transformForRequestNotInited(MarkupOutput)
transformForRequestProcessing(MarkupOutput)
transformForRequestSuccessful(MarkupOutput)
transformForRequestWaitingForUserInput(MarkupOutput)
protected void
displayError(MarkupOutput out, java.lang.String className, java.lang.String methodName, java.lang.Exception e)
Generates an error message to the end user.protected void
displayError(MarkupOutput out, java.lang.String className, java.lang.String methodName, java.lang.Exception e, java.lang.String title, java.lang.String message)
Generates an error message to the end user.protected void
displayError(MarkupOutput out, java.lang.String className, java.lang.String methodName, java.lang.Exception e, java.lang.String title, java.lang.String message, boolean addContactInfo)
Generates an error message to the end user.protected java.lang.String
emptyCell()
Convenience method that checks if the output format is SCREEN_READER and determines whether to show a " " orHTMLHelper.SCREEN_READER_EMPTY_CELL_DISPLAY
.protected boolean
excludeStaticTags()
Indicates if a layout transformation will include or exclude static code defined in the layout file.protected AnchorTag
generateAnchor(WebEvent event)
Creates an<a>
tag from the EventManager.protected AnchorTag
generateAnchorForExport(WebEvent event)
Creates an anchor tag to be used especifically for Export requestsprotected void
generateHiddenInputsForEvent(MarkupOutput out, int eventId)
protected Tag
generateIFrameTag(java.lang.String name)
protected AppContext
getAppContext()
Convenience method that returns the current AppContext.protected java.lang.String
getArgumentName(WebEvent event, int argumentID)
For the given event, returns the name of the argument with the given ID.java.util.Map
getAttributesShellDiv()
Returns a Map with the list of attributes that the shell div must use.protected java.lang.String
getBeanPath()
Returns the path within the application of the WebBean being transformed.protected java.lang.String
getBoneId()
Returns the id to be used for the JavaScript bone.protected WebEvent
getCancelEvent()
protected ClientSideHelper
getClientSideHelper()
Obtain an instance of theClientSideHelper
classprotected ContainerServices
getContainerServices()
Convenience method to retrieve the connected Container Services object.protected TransformContext
getContext()
Returns the instance of TransformContext with context information for this Transform.protected ContextMenu
getContextMenu(java.lang.String menuName)
Returns the corresponding context-menu.protected ContextMenuManager
getContextMenuManager()
Returns theContextMenuManager
instance used by this Transform.protected java.lang.String
getContextMenuManagerName()
Returns the name to use for theContextMenuManager
of this Transform.protected ShortcutListSet
getContextMenusDefinition()
Returns the definition used to populate the context-menus of this Transform.protected java.lang.String
getCssPrefix()
java.lang.String
getDateFormat()
MarkupOutput
getDebugOut(int debugFlags)
Get the Debug Information into the outputjava.lang.String
getDescriptor(int key)
Get the descriptor for the given key.java.lang.String
getDescriptor(int key, java.lang.String defaultValue)
java.lang.String
getDescriptor(java.lang.String key)
Get the descriptor for the given key.java.lang.String
getDescriptor(java.lang.String key, java.lang.String defaultDescriptor)
java.lang.String
getDisplayMode()
get the display mode used when the GuiComponent renders itselfjava.lang.String
getDisplayName(WebObjectInfo object)
java.lang.String
getErrorMessage(int errorCode, java.lang.String defaultMessage)
Returns the error message for the transform, based on the exception.java.lang.String
getErrorMessage(java.lang.Exception e)
Returns the error message for the transform, based on the exception.java.lang.String
getErrorTitle(int errorCode)
Returns the error title for the transform, based on the errorCode.java.lang.String
getErrorTitle(java.lang.Exception e)
Returns the error title for the transform, based on the exception.EventManager
getEventManager()
Convenience method for obtaining theEventManager
instance associated with this transformint
getFirstDayOfWeek()
protected static float
getFloatValue(FormalParameter parameter)
Returns thefloat
value of aFormalParameter
.java.lang.String
getHelpPath()
Returns the help path for the help type of user.java.lang.String
getID()
Returns the unique name of the component to be used as the ID for its shell.protected static int
getIntValue(FormalParameter parameter)
Returns theint
value of aFormalParameter
.protected java.lang.String
getJSNameSpace()
Returns a unique name space used by the getID method as a prefix of the component's idprotected LayoutContext
getLayoutContext(Transformable data, boolean excludeStaticTags)
Gets the LayoutContext instance to use for any layout processing.protected java.util.Locale
getLocale()
Returns number/date locale.static java.util.Locale
getLocale(AppContext appCtx, boolean isNumberDate, java.util.Locale defaultLocale)
java.lang.String
getPreferenceValue(java.lang.String preferenceName)
Convenience method that returns the value of a preference.protected java.lang.String
getProjectID()
Private method that gets the Project ID from the session managerprotected WebEvent
getRefreshEvent()
protected RequestKeys
getRequestKeys()
If the beanContenxt of the associated bean is an instance ofAppContext
, the method returns theRequestKeys
object associated with itjava.lang.String
getResourcesFolder(java.lang.String folderType)
Maps the AppContext'sgetResourceFolder
method, but it validates that the getBeanContext is indeed an AppContext.protected java.lang.String
getScriptClass()
Returns the name of the javaScript class (if any) to be associated with the component.protected static java.lang.String
getStringValue(FormalParameter parameter)
Returns the string value of the Formal Paramter.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.java.lang.String
getStyleShellDiv()
Returns thestyle
(that is, the style attribute used for css formatting) of the shell's div.java.lang.Class
getSupportedBeanType()
Returns the supported bean type.TagsFactory
getTagsFactory()
Convenience method for obtaining an instance of theTagsFactory
class.java.lang.String
getTimeFormat()
protected java.lang.String
getUnitsLabel(java.lang.String unitsID)
Returns the descriptor associated with unit.WebBeanError
getWebBeanErrorInfo()
boolean
hasSubBlock()
Deprecated.this method is no longer usedprotected void
initHeightAndWidthFromPreferences()
Initializes the _height and _width of this component from the bone dimesions retrieved from Preferences.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 notprotected boolean
isBlockMode()
Helper method indicating whether the transform is in block mode or notboolean
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 notprotected boolean
isDialog()
Defines whether this Transform should behave as a dialog (for example, a pop-up window).boolean
isDormant()
boolean
isFeatureAvailable(java.lang.String feature)
Convenience method.boolean
isIFrameDisplayMode()
Determines if the display mode should consider iframe request or not.protected boolean
isIFrameEnabled()
Whether iframe update technology is enabled for this Transform.boolean
isIFrameRequest()
Returntrue
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.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).protected boolean
isOpen()
Defines whether this Transform is currently visible to the end user.boolean
isPortlet()
Indicates web page is used as a portlet.protected static boolean
isTrue(FormalParameter parameter)
Checks for aBoolean
FormalParamter
and return its booleanValue().protected boolean
localIsIFrameDisplayMode()
Called byisIFrameDisplayMode()
, it helps determining 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.protected ParameterBuilder
newHiddenInputBuilder()
Convenience method to retrieve a new instance of a Hidden Input Builder from the connected Container Services object.protected NamespaceEncoder
newNamespaceEncoder()
Convenience method to retrieve a new instance of a Namespace Encoder from the connected Container Services object.protected ParameterBuilder
newURIBuilder()
Convenience method to retrieve a new instance of a URI Builder from the connected Container Services object.protected void
redirectToDisplayError(MarkupOutput out, int errorCode)
This method is used to jump to a new "Error page" to show error messages based on error code.protected void
redirectToDisplayError(MarkupOutput out, java.lang.String errorMessage)
Deprecated, for removal: This API element is subject to removal in a future version.useredirectToDisplayError(MarkupOutput, int)
instead.protected void
renderBean(MarkupOutput out, WebComponent beanToRender, java.lang.String style)
protected void
renderBean(MarkupOutput out, WebComponent beanToRender, java.lang.String style, boolean iframeDisplayMode)
void
renderBean(MarkupOutput out, java.lang.String name)
Renders any bean within the hierachy using its default stylevoid
renderBean(MarkupOutput out, java.lang.String name, java.lang.String style)
Renders any bean within the hierachy using the specified styleprotected void
renderCancelButton(MarkupOutput out)
Renders the Cancel button for the wait page.protected void
renderContextMenus(MarkupOutput out)
Generates the HTML necessary to use context-menus with this transform.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 givenMarkupOutput
.void
renderDescriptor(MarkupOutput out, java.lang.String key)
Generates the string associted with a descriptor in the givenMarkupOutput
.void
renderErrorButton(MarkupOutput out)
Renders the reexecute event button Transfrom will override it if necessaryvoid
renderHiddenInputFromRequest(MarkupOutput out, java.lang.String name)
Renders a hidden input if the name is found on the request keys.void
renderImage(MarkupOutput out, java.lang.String image)
Renders a transform's imageprotected boolean
renderLayout(MarkupOutput out)
Renders the transform information using layout-xml.protected void
renderProcessingButton(MarkupOutput out, WebEvent event, java.lang.String buttonDescriptor)
Renders one button for the Wait page.protected void
renderProcessingButton(MarkupOutput out, WebEvent event, java.lang.String buttonDescriptor, java.lang.String buttonCSS)
Renders one button for the Wait page.protected void
renderProcessingButton(MarkupOutput out, java.util.ArrayList<WebEvent> eventList, java.lang.String buttonDescriptor, java.lang.String buttonCSS)
protected void
renderProcessingButtonForGet(MarkupOutput out, WebEvent event, java.lang.String buttonDescriptor, java.lang.String buttonCSS)
Renders one button for the Wait page.protected void
renderProcessingButtonForGet(MarkupOutput out, java.util.ArrayList<WebEvent> eventList, java.lang.String buttonDescriptor, java.lang.String buttonCSS)
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).protected void
renderProcessingInfoData(MarkupOutput out, java.lang.String propertyName, java.lang.String propertyValue)
This method is used in the wait page to generate data about the current execution.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"protected void
renderProcessingInfoTitle(MarkupOutput out)
Generates the title when the request is still processing (for example, in the wait page).protected void
renderProcessingObjectName(MarkupOutput out)
protected void
renderRefreshButton(MarkupOutput out)
Renders the Refresh button for the wait page.protected void
renderRegisterBone(MarkupOutput out)
If a scriptClass is specified, this method registers the corresponding javascript bone for this component.void
renderSelf(MarkupOutput out, java.lang.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 HTMLvoid
renderUserHelpAnchor(MarkupOutput out, java.lang.String name)
protected void
setBoneProperties(JsonGenerator boneProps)
Sets the necessary properties to the bone assigned to this transform (based on thescriptClass
formal parameter)
Usually called byrenderRegisterBone(MarkupOutput)
Can be overwritten to add or modify bone properties.void
setDisplayMode(java.lang.String value)
set the display mode used when the GuiComponent renders itselfvoid
setHasSubBlock(boolean newValue)
set the flag to signal whether this transform will output pure html or an array of sub json blocks to update itselfprotected void
setHeight(java.lang.String height)
Registers the height of the component.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 GuiComponentvoid
setShellAttributeOnClosedComponent(java.util.HashMap __result)
protected void
setWidth(java.lang.String width)
Registers the width of the component.protected boolean
shouldDisplay()
Determines whether the transform should render itself or not.void
transform(Transformable data, MarkupOutput out)
Transform the data into output.void
transformForRequestCanceled(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.WebBeanRequestCanceled
.void
transformForRequestInError(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.WebBeanRequestEndsInError
.void
transformForRequestNotInited(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.WebBeanRequestNotInitiated
.void
transformForRequestProcessing(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.WebBeanRequestProcessing
.abstract void
transformForRequestSuccessful(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.WebBeanRequestSuccessful
.void
transformForRequestWaitingForUserInput(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.WebBeanRequestWaitingForUserInput
, that is when the bean needs to answer prompts.-
Methods inherited from class com.microstrategy.web.transform.AbstractLayoutTransform
getLayoutDefinition, setLayoutDefinition, transformUsingLayout
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, canTransform, getEvents, getFormalParams, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.transform.Transform
canTransform, getDescription, getFormalParams, getPreview, isPreviewAvailable, isResolved, supports, supports
-
-
-
-
Field Detail
-
FP_SCRIPT_CLASS
public static final java.lang.String FP_SCRIPT_CLASS
Constant for the name of thescriptClass
formal parameter.- Since:
- MicroStrategy Web 9.0.0
- See Also:
scriptClass
, Constant Field Values
-
FP_DEBUG_FLAGS
public static final java.lang.String FP_DEBUG_FLAGS
Constant for the name of thedebugFlags
Formal Parameter.- See Also:
debugFlags
, Constant Field Values
-
FP_DEBUG_ERROR_FLAGS
public static final java.lang.String FP_DEBUG_ERROR_FLAGS
Constant for the name of thedebugErrorFlags
Formal Parameter.- See Also:
debugErrorFlags
, Constant Field Values
-
FP_CSS_FILE
public static final java.lang.String FP_CSS_FILE
Constant for the name of thecssFile
Formal Parameter.- See Also:
cssFile
, Constant Field Values
-
FP_CSS_PREFIX
public static final java.lang.String FP_CSS_PREFIX
Constant for the name of thecssPrefix
Formal Parameter.- See Also:
cssPrefix
, Constant Field Values
-
FP_EXTRA_URL
public static final java.lang.String FP_EXTRA_URL
Constant for the name of theextraUrl
Formal Parameter.- See Also:
extraUrl
, Constant Field Values
-
FP_EXTRA_INPUT
public static final java.lang.String FP_EXTRA_INPUT
Constant for the name of theextraInput
Formal Parameter.- See Also:
extraInput
, Constant Field Values
-
FP_IMG_WAIT
@Deprecated public static final java.lang.String FP_IMG_WAIT
Deprecated.The wait image is generated using css.Constant for the name of theimgWait
Formal Parameter.- See Also:
imgWait
, Constant Field Values
-
FP_INITIAL_INDENT
@Deprecated public static final java.lang.String FP_INITIAL_INDENT
Deprecated.Indentation is not generated by Transforms anymore.Constant for the name of theinitialIndent
Formal Parameter.- See Also:
initialIndent
, Constant Field Values
-
FP_CSS_ERROR_TITLE
@Deprecated public static final java.lang.String FP_CSS_ERROR_TITLE
Deprecated.The css class to use cannot be controlled through a formal parameter anymore.Constant for the name of theglobalCssErrorTitle
Formal Parameter.- See Also:
globalCssErrorTitle
, Constant Field Values
-
FP_CSS_ERROR_MESSAGE
@Deprecated public static final java.lang.String FP_CSS_ERROR_MESSAGE
Deprecated.The css class to use cannot be controlled through a formal parameter anymore.Constant for the name of theimgWait
Formal Parameter.- See Also:
imgWait
, Constant Field Values
-
FP_IFRAME_ENABLED
public static final java.lang.String FP_IFRAME_ENABLED
Constant for the name of theiframeEnabled
Formal Parameter.- Since:
- MicroStrategy Web 8.0.0
- See Also:
iframeEnabled
, Constant Field Values
-
FP_WIDTH
public static final java.lang.String FP_WIDTH
Constant for the name of thewidth
Formal Parameter.- Since:
- MicroStrategy Web 8.0.0
- See Also:
width
, Constant Field Values
-
FP_HEIGHT
public static final java.lang.String FP_HEIGHT
Constant for the name of theheight
Formal Parameter.- Since:
- MicroStrategy Web 8.0.0
- See Also:
height
, Constant Field Values
-
FP_ORIENTATION
public static final java.lang.String FP_ORIENTATION
Constant for the name of theorientation
Formal Parameter.- Since:
- MicroStrategy Web 8.0.0
- See Also:
orientation
, Constant Field Values
-
FP_ORIENTATIONS_ALLOWED
public static final java.lang.String FP_ORIENTATIONS_ALLOWED
Constant for the name of theorientationsAllowed
Formal Parameter.- Since:
- MicroStrategy Web 8.0.0
- See Also:
orientationsAllowed
, Constant Field Values
-
FP_DRAG_MODE
public static final java.lang.String FP_DRAG_MODE
Constant for the name of thedragMode
Formal Parameter.- Since:
- MicroStrategy Web 8.0.0
- See Also:
dragMode
, Constant Field Values
-
FP_APPLIES_TO
public static final java.lang.String FP_APPLIES_TO
Constant for the name of theappliesTo
Formal Parameter.- Since:
- MicroStrategy Web 8.0.0
- See Also:
appliesTo
, Constant Field Values
-
FP_TYPE
public static final java.lang.String FP_TYPE
Constant for the name of thetype
Formal Parameter.- Since:
- MicroStrategy Web 8.0.0
- See Also:
type
, Constant Field Values
-
FP_PARTIAL_IFRAME_UPDATE
public static final java.lang.String FP_PARTIAL_IFRAME_UPDATE
Constant for the name of thepartialIframeUpdate
Formal Parameter.- Since:
- MicroStrategy Web 8.0.1
- See Also:
partialIframeUpdate
, Constant Field Values
-
FP_RESIZE_LEVEL
public static final java.lang.String FP_RESIZE_LEVEL
Constant for the name of theresizeLevel
Formal Parameter.- Since:
- MicroStrategy Web 8.0.0
- See Also:
resizeLevel
, Constant Field Values
-
FP_CONTEXT_MENUS
public static final java.lang.String FP_CONTEXT_MENUS
Constant for the name of thecontextMenus
Formal Parameter.- Since:
- MicroStrategy Web 8.0.1
- See Also:
contextMenus
, Constant Field Values
-
FP_PROCESSING_BUTTONS_FLAGS
public static final java.lang.String FP_PROCESSING_BUTTONS_FLAGS
Constant for the name of theprocessingButtonsFlags
Formal Parameter.- Since:
- MicroStrategy Web 8.1.0
- See Also:
processingButtonsFlags
, Constant Field Values
-
FP_PROCESSING_INFO_FLAGS
public static final java.lang.String FP_PROCESSING_INFO_FLAGS
Constant for the name of theprocessingButtonsFlags
Formal Parameter.- Since:
- MicroStrategy Web 8.1.0
- See Also:
processingButtonsFlags
, Constant Field Values
-
RESIZE_NONE
public static final int RESIZE_NONE
Constant to indicate that the component cannot be resized. Used with theresizeLevel
Formal Parameter.
Value:0
.- Since:
- MicroStrategy Web 8.0.0
- See Also:
resizeLevel
, Constant Field Values
-
RESIZE_VERTICAL
public static final int RESIZE_VERTICAL
Constant to indicate that the component can be resized vertically. Used with theresizeLevel
Formal Parameter.
Value:2
.- Since:
- MicroStrategy Web 8.0.0
- See Also:
resizeLevel
, Constant Field Values
-
RESIZE_HORIZONTAL
public static final int RESIZE_HORIZONTAL
Constant to indicate that the component can be resized horizontally. Used with theresizeLevel
Formal Parameter.
Value:2
.- Since:
- MicroStrategy Web 8.0.0
- See Also:
resizeLevel
, Constant Field Values
-
RESIZE_ALL
public static final int RESIZE_ALL
Constant to indicate that the component can be resized both, horizontally and vertically. Used with theresizeLevel
Formal Parameter.
Value:3
.- Since:
- MicroStrategy Web 8.0.0
- See Also:
resizeLevel
, Constant Field Values
-
FP_USE_DHTML
public static final java.lang.String FP_USE_DHTML
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
imgWait
@Deprecated public FormalParameter imgWait
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 theresourcesFolderImage
application configuration parameter.
-
_imgWait
@Deprecated protected java.lang.String _imgWait
Deprecated.This value is not used anymore by the Transform as the wait image is included using css.Property corresponding to the value of theimgWait
formal parameter- See Also:
imgWait
-
scriptClass
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.- Since:
- MicroStrategy Web 9.0.0
-
cssFile
public FormalParameter cssFile
CSS file that includes the style definition.
If defined, this file will be included as Link.
-
_cssPrefix
protected java.lang.String _cssPrefix
Property corresponding to the value of thecssPrefix
formal parameter
-
cssPrefix
public FormalParameter cssPrefix
Prefix to append to all css class names.
-
iframeEnabled
public FormalParameter iframeEnabled
Indicates whether the transform supports iframe manipulations.- Since:
- MicroStrategy Web 8.0.0
-
debugFlags
public FormalParameter debugFlags
Indicates which debug information to include.
The flags are taken from theEnumWebAppDebugFlags
enumeration.
-
debugErrorFlags
public FormalParameter debugErrorFlags
Indicates which extra debug information to include in case of an error.
The flags are taken from theEnumWebAppDebugFlags
enumeration.
-
extraUrl
public FormalParameter extraUrl
Indicates any extra parameters to be included in the links generated by the transform.
-
extraInput
public FormalParameter extraInput
Indicates any extra inputs to be included in the forms generated by the transform.
-
width
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.- Since:
- MicroStrategy Web 8.0.0
-
height
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.- Since:
- MicroStrategy Web 8.0.0
-
initialIndent
@Deprecated public FormalParameter initialIndent
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.
-
globalCssErrorTitle
@Deprecated public FormalParameter globalCssErrorTitle
Deprecated.The css class to use cannot be controlled through a formal parameter anymore.CSS to be used in all Error titles.
-
globalCssErrorMessage
@Deprecated public FormalParameter globalCssErrorMessage
Deprecated.The css class to use cannot be controlled through a formal parameter anymore.CSS to be used in all error messages.
-
orientation
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
- Since:
- MicroStrategy Web 8.0.0
-
orientationsAllowed
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)
- Since:
- MicroStrategy Web 8.0.0
-
dragMode
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)
- Since:
- MicroStrategy Web 8.0.0
-
appliesTo
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.- Since:
- MicroStrategy Web 8.0.0
-
type
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.- Since:
- MicroStrategy Web 8.0.0
-
partialIframeUpdate
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.- Since:
- MicroStrategy Web 8.0.1
-
resizeLevel
public FormalParameter resizeLevel
Indicates whether the component can be resized vertically/horizontally or both or none. Possible values areRESIZE_NONE
,RESIZE_VERTICAL
,RESIZE_HORIZONTAL
,RESIZE_ALL
- Since:
- MicroStrategy Web 8.0.0
-
contextMenus
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:
- The name of a <menu> defined in the pageConfig
- The path of an xml file with the context-menu definition
- Since:
- MicroStrategy Web 8.0.1
-
processingButtonsFlags
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
- Since:
- MicroStrategy Web 8.1.0
-
processingInfoFlags
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
-
useDHTML
public FormalParameter useDHTML
Indicates whether to use DHTML on the output.
If not set, the bean'sOutputFormat()
method will be used.- Since:
- MicroStrategy Web 9.0.0
-
indent
@Deprecated protected int indent
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.
-
CLASS_MESSAGE
@Deprecated protected final java.lang.String CLASS_MESSAGE
Deprecated.This property is not used anymore by the transform.CSS-Class name used for messages.- See Also:
- Constant Field Values
-
CLASS_INPUT
@Deprecated protected final java.lang.String CLASS_INPUT
Deprecated.This property is not used anymore by the transform.CSS-Class name used for<input>
tags.- See Also:
- Constant Field Values
-
_imgBlank
protected java.lang.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).- Since:
- MicroStrategy Web 8.0.0
-
PROCESSING_INFO_NAME
public static final int PROCESSING_INFO_NAME
Allowed value for theprocessingInfoFlags
formal parameter. Specifies that the name of the object will be displayed on the wait page.
Value = 1- See Also:
- Constant Field Values
-
PROCESSING_INFO_DESCRIPTION
public static final int PROCESSING_INFO_DESCRIPTION
Allowed value for theprocessingInfoFlags
formal parameter. Specifies that the description of the object will be displayed on the wait page.
Value = 2- See Also:
- Constant Field Values
-
PROCESSING_INFO_STATUS
public static final int PROCESSING_INFO_STATUS
Allowed value for theprocessingInfoFlags
formal parameter. Specifies that the status of the object will be displayed on the wait page.
Value = 4- See Also:
- Constant Field Values
-
PROCESSING_INFO_LAST_UPDATE
public static final int PROCESSING_INFO_LAST_UPDATE
Allowed value for theprocessingInfoFlags
formal parameter. Specifies that the last update time of the object will be displayed on the wait page.
Value = 8- See Also:
- Constant Field Values
-
PROCESSING_INFO_ALL
public static final int PROCESSING_INFO_ALL
Allowed value for theprocessingInfoFlags
formal parameter. Convenience flag that includes all possible information values.
Value = 16777215- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Constant Field Values
-
PROCESSING_INFO_NONE
public static final int PROCESSING_INFO_NONE
Allowed value for theprocessingInfoFlags
formal parameter. Convenience flag that includes no information values.
Value = 0- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Constant Field Values
-
PROCESSING_BUTTONS_REFRESH
public static final int PROCESSING_BUTTONS_REFRESH
Allowed value for theprocessingButtonsFlags
formal parameter. Specifies that the Refresh button will be displayed on the wait page.
Value = 1- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Constant Field Values
-
PROCESSING_BUTTONS_CANCEL
public static final int PROCESSING_BUTTONS_CANCEL
Allowed value for theprocessingButtonsFlags
formal parameter. Specifies that the Cancel button will be displayed on the wait page.
Value = 2- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Constant Field Values
-
PROCESSING_BUTTONS_HISTORY_LIST
public static final int PROCESSING_BUTTONS_HISTORY_LIST
Allowed value for theprocessingButtonsFlags
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- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Constant Field Values
-
PROCESSING_BUTTONS_VIEW_DETAILS
public static final int PROCESSING_BUTTONS_VIEW_DETAILS
Allowed value for theprocessingButtonsFlags
formal parameter. Specifies that the View Details button will be displayed on the wait page.
Value = 8- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Constant Field Values
-
PROCESSING_BUTTONS_ALL
public static final int PROCESSING_BUTTONS_ALL
Allowed value for theprocessingButtonsFlags
formal parameter. Convenience flag that includes all possible processing buttons values.
Value = 16777215- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Constant Field Values
-
_bean
protected WebComponent _bean
Instance ofWebComponent
being transformed.
-
_componentBlock
protected ComponentBlock _componentBlock
-
_subOutput
@Deprecated protected MarkupOutput _subOutput
Deprecated.this field is no longer used since partial update blocks are now generated viaComponentBlock
-
_selfOutput
@Deprecated protected MarkupOutput _selfOutput
Deprecated.this field is no longer used since partial update blocks are now generated viaComponentBlock
-
isDHTML
@Deprecated protected boolean isDHTML
Deprecated.UseisDhtml()
.Returns true if using DHTML. This values is initialized based on the bean'sOutputFormat()
method.
-
scriptEndTagEncoder
protected static final ScriptVariableJSONEncoder scriptEndTagEncoder
reference to encoder that deals with tag encoding
-
-
Method Detail
-
getClientSideHelper
protected ClientSideHelper getClientSideHelper()
Obtain an instance of theClientSideHelper
class- Returns:
ClientSideHelper
instance associated with this transform.- Since:
- MicroStrategy Web 8.0.0
-
addFormalParameter
public FormalParameter addFormalParameter(java.lang.String name, int type, java.lang.Object defaultValue, java.lang.String description)
Adds a formal parameter for this transform with the given information- Parameters:
name
- the name of the formal parametertype
- the type of the formal parameter, as defined in theFormalParameter
constants.defaultValue
- the default valuedescription
- Description of the FP, to use by the style catalog.- Returns:
- the FormalParameter created.
-
transform
public final void transform(Transformable data, MarkupOutput out)
Transform the data into output. This method will call in order:-
initializeTransform(com.microstrategy.web.beans.Transformable)
to initialize internal data strucutures. -
renderShell(com.microstrategy.web.beans.MarkupOutput)
the entry point to generate the output.
-
-
generateIFrameTag
protected Tag generateIFrameTag(java.lang.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.
- Since:
- MicroStrategy Web 8.1.0
-
transformForRequestInError
public void transformForRequestInError(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.WebBeanRequestEndsInError
. This method just callsdisplayError(com.microstrategy.web.beans.MarkupOutput, java.lang.String, java.lang.String, java.lang.Exception)
with the title and message based on the error code from thebean
'sErrorInfo
, as provided by the thegetErrorTitle
andgetErrorMessage
methods accordingly.
Transforms that would like to generate customized output based on the error should extend this method.- Parameters:
out
- output by this transform- See Also:
checkStatus(com.microstrategy.web.beans.MarkupOutput)
-
getWebBeanErrorInfo
public WebBeanError getWebBeanErrorInfo()
- Returns:
- the error info
- Since:
- MicroStrategy Web 8.0.1
-
renderErrorButton
public void renderErrorButton(MarkupOutput out)
Renders the reexecute event button Transfrom will override it if necessary- Parameters:
out
-- Since:
- MicroStrategy Web 8.0.1
-
transformForRequestNotInited
public void transformForRequestNotInited(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.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- See Also:
checkStatus(com.microstrategy.web.beans.MarkupOutput)
-
transformForRequestSuccessful
public abstract void transformForRequestSuccessful(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.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- See Also:
checkStatus(com.microstrategy.web.beans.MarkupOutput)
-
getAttributesShellDiv
public java.util.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.- Since:
- MicroStrategy Web 8.0.0
- See Also:
renderShell(com.microstrategy.web.beans.MarkupOutput)
-
setShellAttributeOnClosedComponent
public void setShellAttributeOnClosedComponent(java.util.HashMap __result)
- Parameters:
__result
-- Since:
- MicroStrategy Web 9.0.0
-
getStyleShellDiv
public java.lang.String getStyleShellDiv()
Returns thestyle
(that is, the style attribute used for css formatting) of the shell's div.- Since:
- MicroStrategy Web 8.0.0
- See Also:
renderShell(com.microstrategy.web.beans.MarkupOutput)
-
transformForRequestCanceled
public void transformForRequestCanceled(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.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- See Also:
checkStatus(com.microstrategy.web.beans.MarkupOutput)
-
transformForRequestWaitingForUserInput
public void transformForRequestWaitingForUserInput(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.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- See Also:
checkStatus(com.microstrategy.web.beans.MarkupOutput)
-
displayError
protected void displayError(MarkupOutput out, java.lang.String className, java.lang.String methodName, java.lang.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 thegetErrorTitle
andgetErrorMessage
methods accordingly
Transforms that would like to generate customized error messages may extend this method.- Parameters:
out
- output by this transformclassName
- the class where the error was originatedmethodName
- the method where the error was originatede
- theException
caught that caused the error- Since:
- MicroStrategy Web 8.0.0
-
displayError
protected void displayError(MarkupOutput out, java.lang.String className, java.lang.String methodName, java.lang.Exception e, java.lang.String title, java.lang.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 transformclassName
- the class where the error was originatedmethodName
- the method where the error was originatede
- theException
caught that caused the errortitle
- the title for the error messagemessage
- the error message to display
-
displayError
protected void displayError(MarkupOutput out, java.lang.String className, java.lang.String methodName, java.lang.Exception e, java.lang.String title, java.lang.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 transformclassName
- the class where the error was originatedmethodName
- the method where the error was originatede
- theException
caught that caused the errortitle
- the title for the error messagemessage
- the error message to displayaddContactInfo
- if the administrator's contact info should be included or not.
-
redirectToDisplayError
@Deprecated(since="11.3.8", forRemoval=true) protected void redirectToDisplayError(MarkupOutput out, java.lang.String errorMessage)
Deprecated, for removal: This API element is subject to removal in a future version.useredirectToDisplayError(MarkupOutput, int)
instead.This method is used to jump to a new "Error page" to show error messages.
-
redirectToDisplayError
protected void redirectToDisplayError(MarkupOutput out, int errorCode)
This method is used to jump to a new "Error page" to show error messages based on error code.- Parameters:
out
- output by this transformerrorCode
- error code to specify the error message.EventManager.getMessageByErrorCode(int, EventManager.EventDescriptorHelper)
}
-
addContactInfo
@Deprecated public java.lang.String addContactInfo(java.lang.String message)
Deprecated.this function is not used anymore.Returns the administrator contact info as defined in theEnumWebPreferences.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.
-
getErrorTitle
public java.lang.String getErrorTitle(java.lang.Exception e)
Returns the error title for the transform, based on the exception. If the exception is of typeMSTRCheckedException
, 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.
-
getErrorTitle
public java.lang.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.
-
getErrorMessage
public java.lang.String getErrorMessage(java.lang.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.
-
getErrorMessage
public java.lang.String getErrorMessage(int errorCode, java.lang.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 messagedefaultMessage
- the default error message to be shown- Returns:
- The error message.
-
transformForRequestProcessing
public void transformForRequestProcessing(MarkupOutput out)
Generates the output when the bean's status isEnumRequestStatus.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 callsrenderProcessingInfo
andrenderProcessingButtons
.- Parameters:
out
- output by this transform- See Also:
checkStatus(com.microstrategy.web.beans.MarkupOutput)
-
renderProcessingInfo
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 callsrenderProcessingInfoTitle
which displays a message informating the user that the request is still executing, then it callsrenderProcessingInfoImage
and then callsrenderProcessingInfoData
to include the object's name.
Subclasses might include their own processing information by extending this method and callingrenderProcessingInfoData
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- See Also:
transformForRequestProcessing(com.microstrategy.web.beans.MarkupOutput)
-
renderProcessingObjectName
protected void renderProcessingObjectName(MarkupOutput out)
- Since:
- MicroStrategy Web 8.1.1
-
renderProcessingInfoSubtitle
public void renderProcessingInfoSubtitle(MarkupOutput out)
Generated the message "Please wait or choose one of the following actions"- Parameters:
out
-- Since:
- MicroStrategy Web 8.0.0
-
renderProcessingInfoImage
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- Parameters:
out
-- Since:
- MicroStrategy Web 8.0.0
-
renderProcessingInfoTitle
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- Since:
- MicroStrategy Web 8.0.0
- See Also:
transformForRequestProcessing(com.microstrategy.web.beans.MarkupOutput)
-
renderProcessingInfoData
protected void renderProcessingInfoData(MarkupOutput out, java.lang.String propertyName, java.lang.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 transformpropertyName
- name of the property to display as a label about the status of the requestpropertyValue
- value of the property to display as a label about the status of the request- Since:
- MicroStrategy Web 8.0.0
- See Also:
renderProcessingInfo(com.microstrategy.web.beans.MarkupOutput)
-
renderProcessingButtons
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- See Also:
transformForRequestProcessing(com.microstrategy.web.beans.MarkupOutput)
-
renderCancelButton
protected void renderCancelButton(MarkupOutput out) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException, UnmodifiableException
Renders the Cancel button for the wait page.
It callsgetCancelEvent()
to obtain the event for the button
The button is not rendered if:
-getCancelEvent()
returns null
-processingButtonsFlags
does not havePROCESSING_BUTTONS_CANCEL
- Parameters:
out
- output for this transform- Throws:
java.lang.IllegalStateException
java.lang.IllegalArgumentException
UnmodifiableException
- Since:
- MicroStrategy Web 8.1.0
-
getCancelEvent
protected WebEvent getCancelEvent()
- Returns:
WebEvent
instance initialized with the information for cancelling a request- Since:
- MicroStrategy Web 8.1.0
-
renderRefreshButton
protected void renderRefreshButton(MarkupOutput out) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException, UnmodifiableException
Renders the Refresh button for the wait page.
It callsgetRefreshEvent()
to obtain the event for the button
The button is not rendered if:
-getRefreshEvent()
returns null
-processingButtonsFlags
does not havePROCESSING_BUTTONS_REFRESH
- Parameters:
out
- output for this transform- Throws:
java.lang.IllegalStateException
java.lang.IllegalArgumentException
UnmodifiableException
- Since:
- MicroStrategy Web 8.1.0
-
getRefreshEvent
protected WebEvent getRefreshEvent()
- Returns:
WebEvent
instance initialized with the information for refreshing the request- Since:
- MicroStrategy Web 8.1.0
-
renderProcessingButton
protected void renderProcessingButton(MarkupOutput out, WebEvent event, java.lang.String buttonDescriptor)
Renders one button for the Wait page.- Parameters:
out
- the output for the transformevent
- event for the buttonbuttonDescriptor
- the buton's descriptor- Since:
- MicroStrategy Web 8.1.0
-
renderProcessingButton
protected void renderProcessingButton(MarkupOutput out, WebEvent event, java.lang.String buttonDescriptor, java.lang.String buttonCSS)
Renders one button for the Wait page.- Parameters:
out
- the output for the transformevent
- event for the buttonbuttonDescriptor
- the buton's descriptorbuttonCSS
- the buton's css class name- Since:
- MicroStrategy Web 8.1.0
-
renderProcessingButton
protected void renderProcessingButton(MarkupOutput out, java.util.ArrayList<WebEvent> eventList, java.lang.String buttonDescriptor, java.lang.String buttonCSS)
-
renderProcessingButtonForGet
protected void renderProcessingButtonForGet(MarkupOutput out, WebEvent event, java.lang.String buttonDescriptor, java.lang.String buttonCSS)
Renders one button for the Wait page.- Parameters:
out
- the output for the transformevent
- event for the buttonbuttonDescriptor
- the buton's descriptorbuttonCSS
- the buton's css class name- Since:
- MicroStrategy Web 8.1.0
-
renderProcessingButtonForGet
protected void renderProcessingButtonForGet(MarkupOutput out, java.util.ArrayList<WebEvent> eventList, java.lang.String buttonDescriptor, java.lang.String buttonCSS)
-
initializeTransform
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
This method is automatically called from theinitializeWebComponent
,initializeImages
andinitializeCss
methods.transform
method. Transforms which would like to invoke other methods in this instance directly (for example, to invoke some render methods), need first to call this method to guarantee that the Transform is ready to generate output.- Specified by:
initializeTransform
in interfaceAppTransform
- Parameters:
data
- the bean to transform.
-
initializeWebComponent
public void initializeWebComponent(Transformable data)
Initialize the web component to be used by the transform.- Specified by:
initializeWebComponent
in interfaceAppTransform
- Parameters:
data
- the bean to transform.- Since:
- MicroStrategy Web 8.0.0
-
initializeImages
public void initializeImages()
Initialize the images to be used by this transform.
-
initializeCss
public void initializeCss()
Initialize the css classes to be used by this transform.
-
renderCssLink
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
-
getID
public java.lang.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).- Specified by:
getID
in interfaceTransform
- Overrides:
getID
in classAbstractTransform
- Returns:
- the component's unique id
- Since:
- MicroStrategy Web 8.0.0
-
getDisplayName
public java.lang.String getDisplayName(WebObjectInfo object)
- Since:
- MicroStrategy Web 9.0.0
-
getJSNameSpace
protected java.lang.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
- Since:
- MicroStrategy Web 8.0.0
-
getScriptClass
protected java.lang.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- Since:
- MicroStrategy Web 8.0.0
-
setIsDormant
public void setIsDormant(boolean isDormant)
Tells the transform whether the bone is dormant or not, in which case it should not receive event notification.- Specified by:
setIsDormant
in interfaceAppTransform
- Parameters:
isDormant
- boolean- Since:
- MicroStrategy Web 9.0.0
-
isDormant
public boolean isDormant()
- Specified by:
isDormant
in interfaceAppTransform
- Since:
- MicroStrategy Web 9.0.0
-
setHasSubBlock
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
-
hasSubBlock
@Deprecated public boolean hasSubBlock()
Deprecated.this method is no longer usedthe 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
-
setRenderSubBlock
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
-
renderSubBlock
public boolean renderSubBlock()
the boolean indicates whether this GuiComponent allows sub json blocks to update or just pure HTML- Returns:
- the boolean flag
-
setDisplayMode
public void setDisplayMode(java.lang.String value)
set the display mode used when the GuiComponent renders itself- Specified by:
setDisplayMode
in interfaceAppTransform
- Parameters:
value
- String the display mode:AppContext.DISPLAY_MODE_HTML
- plain HTMLAppContext.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}
-
getDisplayMode
public java.lang.String getDisplayMode()
get the display mode used when the GuiComponent renders itself- Specified by:
getDisplayMode
in interfaceAppTransform
- Returns:
- the display mode
-
isIFrameDisplayMode
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 overwritelocalIsIFrameDisplayMode()
.- Specified by:
isIFrameDisplayMode
in interfaceAppTransform
- Returns:
- boolean value indicating if the display mode of this transform should be generated for iframe manipulation or not
- Since:
- MicroStrategy Web 8.1.0
-
setIFrameDisplayMode
public void setIFrameDisplayMode(boolean value)
Description copied from interface:AppTransform
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.- Specified by:
setIFrameDisplayMode
in interfaceAppTransform
- Parameters:
value
- boolean indicating if the display mode of this transform should be generated for iframe manipulation or not- Since:
- MicroStrategy Web 8.1.0
-
localIsIFrameDisplayMode
protected boolean localIsIFrameDisplayMode()
Called byisIFrameDisplayMode()
, 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 thesetIFrameDisplayMode(boolean)
method.- Returns:
- boolean value indicating if the display mode of this transform should be generated for iframe manipulation or not
- Since:
- MicroStrategy Web 8.1.0
-
setWidth
protected void setWidth(java.lang.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.- Since:
- MicroStrategy Web 8.0.0
-
setHeight
protected void setHeight(java.lang.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.- Since:
- MicroStrategy Web 8.0.0
-
renderShell
public void renderShell(MarkupOutput out)
Generates the shell for this Transform.
The shell is a
The attributes to append to this<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.<div>
are obtained from thegetAttributesShellDiv
method; the style from thegetStyleShellDiv
method.
This method callsrenderCssLink
andcheckStatus
to generate the Transform's content.- Parameters:
out
- output by this transform- Since:
- MicroStrategy Web 8.0.0
-
shouldDisplay
protected boolean shouldDisplay()
Determines whether the transform should render itself or not. Returns the result of !isIFrameRequest()
or the result of theWebComponent.hasChanged()
method.- Returns:
- boolean
- Since:
- MicroStrategy Web 9.0.0
-
renderContextMenus
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.- Since:
- MicroStrategy Web 8.0.1
-
getHelpPath
public java.lang.String getHelpPath()
Returns the help path for the help type of user.- Returns:
- String
-
renderRegisterBone
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.- Since:
- MicroStrategy Web 8.0.0
- See Also:
getScriptClass()
-
setBoneProperties
protected void setBoneProperties(JsonGenerator boneProps)
Sets the necessary properties to the bone assigned to this transform (based on thescriptClass
formal parameter)
Usually called byrenderRegisterBone(MarkupOutput)
Can be overwritten to add or modify bone properties.- Parameters:
boneProps
- the JsonGenerator object that contains the collection of bone properties.
-
getBeanPath
protected java.lang.String getBeanPath()
Returns the path within the application of the WebBean being transformed.
When submitting anWebEvent
, this path allows Microstrategy Web to uniquely identify the location of the bean that needs to handle the event.
This method is used by therenderRegisterBone
method to inform the javascript bone the bean to whom it should send its server-side requests.- Returns:
- String
- Since:
- MicroStrategy Web 8.0.0
- See Also:
WebComponent.getPath()
,renderRegisterBone(com.microstrategy.web.beans.MarkupOutput)
-
getBoneId
protected java.lang.String getBoneId()
Returns the id to be used for the JavaScript bone.
This method is used by therenderRegisterBone
method to indicate the id of the bone html element.- Returns:
- String
- Since:
- MicroStrategy Web 9.0.0
- See Also:
renderRegisterBone(com.microstrategy.web.beans.MarkupOutput)
-
addDynamicScriptFile
protected void addDynamicScriptFile(java.lang.String file, java.lang.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).- Since:
- MicroStrategy Web 8.0.0
-
addDynamicScriptClass
protected void addDynamicScriptClass(java.lang.String jsClassName)
Add the script dependency based on the JavaScript class.- Parameters:
jsClassName
- class name to add as a dependency.- Since:
- MicroStrategy Web 9.0.0
- See Also:
addDynamicScriptFile(String, String)
-
isOpen
protected boolean isOpen()
Defines whether this Transform is currently visible to the end user.- Returns:
- true if the bean is visible
- Since:
- MicroStrategy Web 8.0.0
-
isModal
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
- Since:
- MicroStrategy Web 8.0.0
-
isDialog
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
- Since:
- MicroStrategy Web 8.0.0
-
excludeStaticTags
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- Since:
- MicroStrategy Web 8.0.0
-
renderLayout
protected boolean renderLayout(MarkupOutput out)
Renders the transform information using layout-xml.
This method should be called for those Transforms extendingLayoutTransform.
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 returnsfalse
/- 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.
- Since:
- MicroStrategy Web 8.0.0
-
checkStatus
protected void checkStatus(MarkupOutput out)
Once the shell is rendered, this method checks the bean'sgetXMLStatus
and calls the corresponding transform method, based on its value:- Parameters:
out
- output by this transform- Since:
- MicroStrategy Web 8.0.0
- See Also:
renderShell(com.microstrategy.web.beans.MarkupOutput)
-
checkLevel
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 tolevel
is on in the Formal Parameterparameter
.
This method expectsparameter
to be of typeInteger
.- Parameters:
level
- level flagparameter
- formal parameter- Returns:
- true means the level flag is included in the level parameter value
-
isTrue
protected static boolean isTrue(FormalParameter parameter)
Checks for aBoolean
FormalParamter
and return its booleanValue().- Parameters:
parameter
- the formal parameter to check- Returns:
- true if the parameter is true.
-
getStringValue
protected static java.lang.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
-
getIntValue
protected static int getIntValue(FormalParameter parameter)
Returns theint
value of aFormalParameter
.
TheFormalParameter
needs to be of typeInteger
.- Parameters:
parameter
- the formal parameter to check- Returns:
- the intValue() of the parameter, 0 if the parameter is invalid.
-
getFloatValue
protected static float getFloatValue(FormalParameter parameter)
Returns thefloat
value of aFormalParameter
.
TheFormalParameter
needs to be of typeFloat
.- Parameters:
parameter
- the formal parameter to check- Returns:
- the Float value of the parameter, 0 if the parameter is invalid.
- Since:
- MicroStrategy Web 8.0.2
-
renderImage
public void renderImage(MarkupOutput out, java.lang.String image)
Renders a transform's image- Parameters:
out
- where to write the output of the method.image
- the image name
-
getDescriptor
public java.lang.String getDescriptor(int key)
Get the descriptor for the given key.
By default this method appends the prefix
If a descriptor is not found for the given key it returns [na]mstrWeb.
to the key to find the resources in the Messages bundle. To find a descriptor for a specific key you might usegetDescriptor(String)
.- Parameters:
key
- input key as anint
, for example,1
- Returns:
- descriptor as a
String
corresponding to the key sent in as parameter, for example,
Home
-
getDescriptor
public java.lang.String getDescriptor(java.lang.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 aString
, for example,mstrWeb.1
*- Returns:
- descriptor as a
String
corresponding to the key sent in as parameter, for example,
Home
. - Since:
- MicroStrategy Web 8.0.0
-
getDescriptor
public java.lang.String getDescriptor(java.lang.String key, java.lang.String defaultDescriptor)
- Since:
- MicroStrategy Web 8.0.1
-
getDescriptor
public java.lang.String getDescriptor(int key, java.lang.String defaultValue)
- Since:
- MicroStrategy Web 11.0.0
-
renderDescriptor
public void renderDescriptor(MarkupOutput out, java.lang.String key)
Generates the string associted with a descriptor in the givenMarkupOutput
. 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 aString
, for example,mstrWeb.1
, which will appendHome
to the output instance.- Since:
- MicroStrategy Web 8.0.0
- See Also:
getDescriptor(String)
-
renderDescriptor
public void renderDescriptor(MarkupOutput out, int key)
Generates the string associted with a descriptor in the givenMarkupOutput
. 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 anint
, it will append the "mstrWeb" namespace so for example,1
, will be interpreted asmstrWeb.1
which will appendHome
to the output instance. *- Since:
- MicroStrategy Web 8.0.0
- See Also:
getDescriptor(int)
-
getResourcesFolder
public java.lang.String getResourcesFolder(java.lang.String folderType)
Maps the AppContext'sgetResourceFolder
method, but it validates that the getBeanContext is indeed an AppContext.- Parameters:
folderType
- the folder type- Returns:
- AppContext's
getResourceFolder
, or""
if not defined.
-
renderBean
public void renderBean(MarkupOutput out, java.lang.String name)
Renders any bean within the hierachy using its default style- Parameters:
out
- MarkupOutput instancename
- the name of the bean to render- Since:
- MicroStrategy Web 8.0.0
-
renderBean
public void renderBean(MarkupOutput out, java.lang.String name, java.lang.String style)
Renders any bean within the hierachy using the specified style- Parameters:
out
- MarkupOutput instancename
- the name of the bean to renderstyle
- the name of the style to user to render the bean- Since:
- MicroStrategy Web 8.0.0
-
renderSelf
public void renderSelf(MarkupOutput out, java.lang.String style)
Renders the bean associated with this transform ("self") using the specified style.- Parameters:
out
- TheMarkupOutput
instance to render into.style
- The name of the style to render this bean.- Since:
- MicroStrategy Web 9.0.0
-
renderBean
protected void renderBean(MarkupOutput out, WebComponent beanToRender, java.lang.String style) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalStateException
java.lang.IllegalArgumentException
- Since:
- MicroStrategy Web 9.0.0
-
renderBean
protected void renderBean(MarkupOutput out, WebComponent beanToRender, java.lang.String style, boolean iframeDisplayMode) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalStateException
java.lang.IllegalArgumentException
- Since:
- MicroStrategy Web 9.0.0
-
isFeatureAvailable
public boolean isFeatureAvailable(java.lang.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; - Since:
- MicroStrategy Web 8.0.0
-
getAppContext
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.
-
getContainerServices
protected ContainerServices getContainerServices()
Convenience method to retrieve the connected Container Services object. If anything fails along the way, returns null.- Returns:
- The ContainerServices instance.
- Since:
- MicroStrategy Web 8.0.0
-
newURIBuilder
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.
- Since:
- MicroStrategy Web 8.0.0
-
newHiddenInputBuilder
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.
- Since:
- MicroStrategy Web 8.0.0
-
newNamespaceEncoder
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.
- Since:
- MicroStrategy Web 8.0.0
-
getSupportedBeanType
public java.lang.Class getSupportedBeanType()
Returns the supported bean type. This abstract Transform supports allWebComponents
so every sub-class should override this method to return the class of theBean
the Transform is expecting, for example:public class CustomReportClass extends AbstractAppTransform { public Class getSupportedBeanType() { //This Transform is expected to work only with a ReportBean, //therefore this method needs to return this class: return ReportBean.class; } }
- Specified by:
getSupportedBeanType
in interfaceTransform
- Returns:
- a root class/interface supported by this transform.
-
emptyCell
protected java.lang.String emptyCell()
Convenience method that checks if the output format is SCREEN_READER and determines whether to show a " " orHTMLHelper.SCREEN_READER_EMPTY_CELL_DISPLAY
.- Returns:
- The string representing the empty cell
-
getArgumentName
protected java.lang.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 argumentargumentID
- argument Id.- Returns:
- The argument name. By default:
event.getArgumentName(argumentID)
- Since:
- MicroStrategy Web 8.0.0
-
getEventManager
public EventManager getEventManager()
Convenience method for obtaining theEventManager
instance associated with this transform- Returns:
EventManager
initialized instance.
-
generateAnchor
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- Since:
- MicroStrategy Web 8.0.0
-
generateAnchorForExport
protected AnchorTag generateAnchorForExport(WebEvent event)
Creates an anchor tag to be used especifically for Export requests
-
getTagsFactory
public TagsFactory getTagsFactory()
Convenience method for obtaining an instance of theTagsFactory
class.- Returns:
- a
TagsFactory
instance to use for generatingTag
instances - Since:
- MicroStrategy Web 8.0.0
-
isIFrameEnabled
protected boolean isIFrameEnabled()
Whether iframe update technology is enabled for this Transform. The iFrame can be disabled either through theiframeEnabled
FormalParameter or if theEnumAppWebFeatures.WebFeatureIFrame
feature is disabled.- Returns:
- whether ifram is enabled
- Since:
- MicroStrategy Web 8.0.0
-
isIFrameRequest
public boolean isIFrameRequest()
Returntrue
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 aniframe
parameter in the request keys. This might change in the future.- Returns:
- boolean true if this is an iframe request.
-
getRequestKeys
protected RequestKeys getRequestKeys()
If the beanContenxt of the associated bean is an instance ofAppContext
, the method returns theRequestKeys
object associated with it- Returns:
- a
RequestKeys
instance - Since:
- MicroStrategy Web 7.5.0
-
isDhtml
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.
- Since:
- MicroStrategy Web 8.0.0
-
is508
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.
- Since:
- MicroStrategy Web 9.0.1
-
initHeightAndWidthFromPreferences
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@....- Since:
- MicroStrategy Web 8.0.0
-
getUnitsLabel
protected java.lang.String getUnitsLabel(java.lang.String unitsID)
Returns the descriptor associated with unit. For example, ifunitsID.equals(LocaleInfo.UNIT_CM)
it returns "Centimeters" (localized).- Parameters:
unitsID
- measure unit. It should be a value fromLocaleInfo
- Returns:
- the descriptor for measurement unit.
- Since:
- MicroStrategy Web 8.0.0
-
getPreferenceValue
public java.lang.String getPreferenceValue(java.lang.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.
- Since:
- MicroStrategy Web 8.0.0
-
isContextMenusEnabled
public boolean isContextMenusEnabled()
Indicates whether context-menus are enabled for this Transform. By default context-menus are enabled only if thecontextMenus
formal parameter has been set.- Returns:
true
if context-menus are enabled in this Transform.- Since:
- MicroStrategy Web 8.0.1
-
getContextMenuManager
protected ContextMenuManager getContextMenuManager()
Returns theContextMenuManager
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. ifisContextMenusEnabled()
returnsfalse
).- Since:
- MicroStrategy Web 8.0.1
-
getContextMenuManagerName
protected java.lang.String getContextMenuManagerName()
Returns the name to use for theContextMenuManager
of this Transform. By default, it usesgetID() + "_cmm"
. Transforms may override this method in case they need a different value.- Since:
- MicroStrategy Web 8.0.1
-
getContextMenusDefinition
protected ShortcutListSet getContextMenusDefinition()
Returns the definition used to populate the context-menus of this Transform. The definition is stored as aShortcutListSet
and is controlled by thecontextMenus
FormalParameter.- Returns:
- ShortcutListSet
- Since:
- MicroStrategy Web 8.0.1
-
getContextMenu
protected ContextMenu getContextMenu(java.lang.String menuName)
Returns the corresponding context-menu. If a validcontextMenus
has been provided, the transform will use it to populate the context-menu, otherwise it will return an emptyContextMenu
instance.- Parameters:
menuName
- Name of the context-menu- Since:
- MicroStrategy Web 8.0.1
-
getContext
protected TransformContext getContext()
Returns the instance of TransformContext with context information for this Transform.- Since:
- MicroStrategy Web 8.0.1
- See Also:
getContextMenu(java.lang.String)
-
newContext
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.- Since:
- MicroStrategy Web 8.0.1
-
getStyleRequestContext
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
- Since:
- MicroStrategy Web 9.0.0
-
isJobExpired
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.
- Since:
- MicroStrategy Web 8.0.1
-
getProjectID
protected java.lang.String getProjectID()
Private method that gets the Project ID from the session manager- Returns:
- String projectID
- Since:
- MicroStrategy Web 9.0.0
-
generateHiddenInputsForEvent
protected void generateHiddenInputsForEvent(MarkupOutput out, int eventId)
- Since:
- MicroStrategy Web 9.0.0
-
getLocale
public static java.util.Locale getLocale(AppContext appCtx, boolean isNumberDate, java.util.Locale defaultLocale)
-
getLocale
protected java.util.Locale getLocale()
Returns number/date locale. Should not be used for messages.- Returns:
- Locale instance
- Since:
- MicroStrategy Web 9.0.0
-
getDateFormat
public java.lang.String getDateFormat()
- Since:
- MicroStrategy Web 9.0.0
-
getFirstDayOfWeek
public int getFirstDayOfWeek()
- Since:
- MicroStrategy Web 9.0.0
-
getTimeFormat
public java.lang.String getTimeFormat()
- Since:
- MicroStrategy Web 9.0.0
-
getCssPrefix
protected java.lang.String getCssPrefix()
- Since:
- MicroStrategy Web 8.1.0
-
checkProcessingButtonsFlag
protected boolean checkProcessingButtonsFlag(int flag)
- Since:
- MicroStrategy Web 8.1.0
-
checkProcessingInfoFlag
protected boolean checkProcessingInfoFlag(int flag)
-
getLayoutContext
protected LayoutContext getLayoutContext(Transformable data, boolean excludeStaticTags)
Description copied from class:AbstractLayoutTransform
Gets the LayoutContext instance to use for any layout processing.- Overrides:
getLayoutContext
in classAbstractLayoutTransform
- Parameters:
data
- TheTransformable
object we are processingexcludeStaticTags
- Whether to exclude static tags.- Returns:
- A
LayoutContext
object. - Since:
- MicroStrategy Web 9.0.0
-
renderUserHelpAnchor
public void renderUserHelpAnchor(MarkupOutput out, java.lang.String name)
- Since:
- MicroStrategy Web 9.0.0
-
renderHiddenInputFromRequest
public void renderHiddenInputFromRequest(MarkupOutput out, java.lang.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 transformname
- the name of the input to render- Since:
- MicroStrategy Web 9.0.0
-
isBlockMode
protected boolean isBlockMode()
Helper method indicating whether the transform is in block mode or not
-
isPortlet
public boolean isPortlet()
Indicates web page is used as a portlet.- Returns:
- A boolean value indicates whether web page is used as a portlet.
-
getDebugOut
public MarkupOutput getDebugOut(int debugFlags)
Get the Debug Information into the output- Parameters:
debugFlags
- an integer of the debugFlags- Returns:
- an instance of
MarkupOutput
. - Since:
- MicroStrategy Web 9.0.3
-
-