Class AbstractTabTransform
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractTransform
-
- com.microstrategy.web.transform.AbstractLayoutTransform
-
- com.microstrategy.web.app.transforms.AbstractAppTransform
-
- com.microstrategy.web.app.transforms.AbstractTabTransform
-
- All Implemented Interfaces:
AppTransform
,Transform
- Direct Known Subclasses:
AbstractFormatTabTransform
,FormatTabEffectsTransform
,TabBeanTransform
,TabDocumentAdvancedTransform
,TabDocumentExportTransform
,TabDocumentOtherTransform
,TabDocumentTableOfContentsTransform
,TabDocumentWatermarkTransform
,TabGraphAdvancedTransform
,TabGraphAxesTransform
,TabGraphGeneralTransform
,TabGraphOptionsTransform
,TabGraphTitlesTransform
,TabLayoutTransform
,TabPageMarginTransform
,TabPageOutputTransform
,TabPageSetupTransform
,TabPropertiesAdvancedTransform
,TabPropertiesDeliveryTransform
,TabPropertiesFlashTransform
,TabPropertiesGeneralTransform
,TabPropertiesGridTransform
,TabPropertiesLayoutTransform
,TabPropertiesLineTransform
,TabPropertiesOtherGridTransform
,TabPropertiesPictureTransform
,TabPropertiesSelectorTransform
,TabSectionsTransform
public abstract class AbstractTabTransform extends AbstractAppTransform
This is the base class for those Transforms that will generate the Tab's content in a tabbed environement. In general, Microstrategy Web utilizes a
TabManager
for these scenarios, the AbstractTabTransform generates all he HTML and javascript necessary for a single Tab to interact with it.To generate the content of a Tab, subclasses need only to worry about implementing the
renderContentsBody
method. For example:public class CustomTab extends AbstractTabTransform { public void renderContentsBody(MarkupOutput out) { out.append("My tab content."); } }
The previous class can be used with aTabBean
inside aTabManager
with multiple tabs; when the corresponding tab is selected, its content will be:My tab content.
Notice that this class does not implement the LayoutTransform; subclasses might decide to do so, though, in these cases the layout will only be applied to the content of the tab.
- Since:
- MicroStrategy Web 8.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
AbstractAppTransform.Context
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
cssBody
Property with the name of the css class to use for the body of this instance transform output.protected java.lang.String
cssFrame
Property with the name of the css class to use for the frame of this instance transform output.protected java.lang.String
cssPicker
Property with the name of the css class to use for the div including a single picker of this instance transform output.protected java.lang.String
cssPickers
Property with the name of the css class to use for the div including all pickers of this instance transform output.static java.lang.String
FP_TAB_HEIGHT
Constant specifying the name of the formal parameter for specifying the height of the tabs on the editorprotected java.lang.String
scriptClassBody
Property with the value of the scriptClass attribute for the body of this instance transform outputprotected java.lang.String
scriptClassFrame
Property with the value of the scriptClass attribute for the frame of this instance transform outputprotected java.lang.String
styBody
Property with the value of the sty attribute for the body of this instance transform outputprotected java.lang.String
styFrame
Property with the value of the sty attribute for the frame of this instance transform outputFormalParameter
tabHeight
Indicates the height of the tabs on the editor.protected java.lang.String
tyBody
Property with the value of the ty attribute for the body of this instance transform outputprotected java.lang.String
tyFrame
Property with the value of the ty attribute for the frame of this instance transform output-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
_bean, _componentBlock, _cssPrefix, _imgBlank, _imgWait, _selfOutput, _subOutput, appliesTo, CLASS_INPUT, CLASS_MESSAGE, contextMenus, cssFile, cssPrefix, debugErrorFlags, debugFlags, dragMode, extraInput, extraUrl, FP_APPLIES_TO, FP_CONTEXT_MENUS, FP_CSS_ERROR_MESSAGE, FP_CSS_ERROR_TITLE, FP_CSS_FILE, FP_CSS_PREFIX, FP_DEBUG_ERROR_FLAGS, FP_DEBUG_FLAGS, FP_DRAG_MODE, FP_EXTRA_INPUT, FP_EXTRA_URL, FP_HEIGHT, FP_IFRAME_ENABLED, FP_IMG_WAIT, FP_INITIAL_INDENT, FP_ORIENTATION, FP_ORIENTATIONS_ALLOWED, FP_PARTIAL_IFRAME_UPDATE, FP_PROCESSING_BUTTONS_FLAGS, FP_PROCESSING_INFO_FLAGS, FP_RESIZE_LEVEL, FP_SCRIPT_CLASS, FP_TYPE, FP_USE_DHTML, FP_WIDTH, globalCssErrorMessage, globalCssErrorTitle, height, iframeEnabled, imgWait, indent, initialIndent, isDHTML, orientation, orientationsAllowed, partialIframeUpdate, PROCESSING_BUTTONS_ALL, PROCESSING_BUTTONS_CANCEL, PROCESSING_BUTTONS_HISTORY_LIST, PROCESSING_BUTTONS_REFRESH, PROCESSING_BUTTONS_VIEW_DETAILS, PROCESSING_INFO_ALL, PROCESSING_INFO_DESCRIPTION, PROCESSING_INFO_LAST_UPDATE, PROCESSING_INFO_NAME, PROCESSING_INFO_NONE, PROCESSING_INFO_STATUS, processingButtonsFlags, processingInfoFlags, RESIZE_ALL, RESIZE_HORIZONTAL, RESIZE_NONE, RESIZE_VERTICAL, resizeLevel, scriptClass, scriptEndTagEncoder, type, useDHTML, width
-
-
Constructor Summary
Constructors Constructor Description AbstractTabTransform()
Default no-argument constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addJSValidationInfo(Tag inputTag, java.lang.String type, java.lang.String min, java.lang.String max, java.lang.String name, java.lang.String errorMsg)
Add the necessary JavaScript validation informationvoid
AddJSValidationInfo(Tag inputTag, java.lang.String type, java.lang.String min, java.lang.String max, java.lang.String name, java.lang.String errorMsg)
protected void
addPicker(ShortcutList picker)
protected java.lang.String
getArgumentName(WebEvent event, int argumentId)
Get the name of the argument assigned to theWebEvent
, based on the indicated id.protected java.util.Map
getAttributesBody()
This method return a Map (name/value pairs) of attributes to use for the div enclosing the body of the Tab.protected java.util.Map
getAttributesFrame()
This method return a Map (name/value pairs) of attributes to use for the div enclosing the content of the Tab.java.lang.String
getDescription()
Returns the textual description of the transformprotected Tag
getDropDownTag(java.lang.String cmdId, java.lang.String cmdValue, ShortcutList picker, java.lang.String type)
Tag
getFieldSetTag(java.lang.String title)
Convenience method that builds and returns a fieldset html tag.protected Tag
getLabelTag(java.lang.String attFor, java.lang.String labelDescriptor)
protected java.lang.String
getPickerId(ShortcutList picker)
java.lang.Class
getSupportedBeanType()
Returns the supported bean type.protected TabBean
getTabBean()
Returns the TabBean for this tab.protected TabManagerBean
getTabManagerBean()
Returns the TabManagerBean for this Tab.void
initializeCss()
Initializes the Css Classes to use.void
initializeJavaScriptAttributes()
For JavaScript, certain properties are required to be added to the HTML tags to generate for its integration with the code generated for the feature to work in DHTML environments.void
initializeTransform(Transformable data)
This method initialize the private and protected fields of the transform.boolean
isCurrentTab()
This method returns true whenever this Tab is selected.protected boolean
isIFrameEnabled()
Whether iframe update technology is enabled for this Transform.void
renderColorDropdown(MarkupOutput out, java.lang.String cmdId, java.lang.String cmdValue, ShortcutList picker)
This method renders a single dropdown to be used with a color pickervoid
renderContents(MarkupOutput out)
Method that renders a frame for the main contents of the transform, according to the information available on the bean.abstract void
renderContentsBody(MarkupOutput out)
Method that renders the main contents of the transform, according to the information available on the bean.void
renderDropdown(MarkupOutput out, java.lang.String cmdId, java.lang.String cmdValue, ShortcutList picker, java.lang.String value)
This method renders a single dropdown list to be used within a tab.void
renderFlashWarning(MarkupOutput out)
Generates the HTML with a label that reads '(Flash Only)'.void
renderJavascriptLinks(MarkupOutput out)
Used to dynamically include links to js files.protected void
renderPickers(MarkupOutput out)
This method needs to be overriden by those Transforms that has a picker.protected void
renderSingleOption(MarkupOutput out, java.lang.String cmdId, boolean checked, java.lang.String msg, boolean isDisabled, boolean setCmdValue)
protected void
renderSingleOption(MarkupOutput out, java.lang.String cmdId, java.lang.String propertyValue, java.lang.String msg, boolean isDisabled)
void
renderTabFrame(MarkupOutput out)
Method that renders a frame for all the contents and sections of the bean that are to be displayed.void
renderTabSectionTitle(MarkupOutput out, java.lang.String title)
Deprecated.please use getFieldSetTag insteadvoid
transformForRequestSuccessful(MarkupOutput out)
Transforms the assosciatedTabBean
when its status isEnumRequestStatus.WebBeanRequestSuccessful
.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
addContactInfo, addDynamicScriptClass, addDynamicScriptFile, addFormalParameter, checkLevel, checkProcessingButtonsFlag, checkProcessingInfoFlag, checkStatus, displayError, displayError, displayError, emptyCell, excludeStaticTags, generateAnchor, generateAnchorForExport, generateHiddenInputsForEvent, generateIFrameTag, getAppContext, getAttributesShellDiv, getBeanPath, getBoneId, getCancelEvent, getClientSideHelper, getContainerServices, getContext, getContextMenu, getContextMenuManager, getContextMenuManagerName, getContextMenusDefinition, getCssPrefix, getDateFormat, getDebugOut, getDescriptor, getDescriptor, getDescriptor, getDescriptor, getDisplayMode, getDisplayName, getErrorMessage, getErrorMessage, getErrorTitle, getErrorTitle, getEventManager, getFirstDayOfWeek, getFloatValue, getHelpPath, getID, getIntValue, getJSNameSpace, getLayoutContext, getLocale, getLocale, getPreferenceValue, getProjectID, getRefreshEvent, getRequestKeys, getResourcesFolder, getScriptClass, getStringValue, getStyleRequestContext, getStyleShellDiv, getTagsFactory, getTimeFormat, getUnitsLabel, getWebBeanErrorInfo, hasSubBlock, initHeightAndWidthFromPreferences, initializeImages, initializeWebComponent, is508, isBlockMode, isContextMenusEnabled, isDhtml, isDialog, isDormant, isFeatureAvailable, isIFrameDisplayMode, isIFrameRequest, isJobExpired, isModal, isOpen, isPortlet, isTrue, localIsIFrameDisplayMode, newContext, newHiddenInputBuilder, newNamespaceEncoder, newURIBuilder, redirectToDisplayError, redirectToDisplayError, renderBean, renderBean, renderBean, renderBean, renderCancelButton, renderContextMenus, renderCssLink, renderDescriptor, renderDescriptor, renderErrorButton, renderHiddenInputFromRequest, renderImage, renderLayout, renderProcessingButton, renderProcessingButton, renderProcessingButton, renderProcessingButtonForGet, renderProcessingButtonForGet, renderProcessingButtons, renderProcessingInfo, renderProcessingInfoData, renderProcessingInfoImage, renderProcessingInfoSubtitle, renderProcessingInfoTitle, renderProcessingObjectName, renderRefreshButton, renderRegisterBone, renderSelf, renderShell, renderSubBlock, renderUserHelpAnchor, setBoneProperties, setDisplayMode, setHasSubBlock, setHeight, setIFrameDisplayMode, setIsDormant, setRenderSubBlock, setShellAttributeOnClosedComponent, setWidth, shouldDisplay, transform, transformForRequestCanceled, transformForRequestInError, transformForRequestNotInited, transformForRequestProcessing, transformForRequestWaitingForUserInput
-
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, getFormalParams, getPreview, isPreviewAvailable, isResolved, supports, supports
-
-
-
-
Field Detail
-
tabHeight
public FormalParameter tabHeight
Indicates the height of the tabs on the editor.
-
FP_TAB_HEIGHT
public static final java.lang.String FP_TAB_HEIGHT
Constant specifying the name of the formal parameter for specifying the height of the tabs on the editor- See Also:
- Constant Field Values
-
cssPickers
protected java.lang.String cssPickers
Property with the name of the css class to use for the div including all pickers of this instance transform output. The value specified on thecssPrefix
formal parameter will by default be added to this property value at initialization time (initializeCss()
)
-
cssPicker
protected java.lang.String cssPicker
Property with the name of the css class to use for the div including a single picker of this instance transform output. The value specified on thecssPrefix
formal parameter will by default be added to this property value at initialization time (initializeCss()
)
-
cssFrame
protected java.lang.String cssFrame
Property with the name of the css class to use for the frame of this instance transform output. The value specified on thecssPrefix
formal parameter will by default be added to this property value at initialization time (initializeCss()
)
-
cssBody
protected java.lang.String cssBody
Property with the name of the css class to use for the body of this instance transform output. The value specified on thecssPrefix
formal parameter will by default be added to this property value at initialization time (initializeCss()
)
-
styFrame
protected java.lang.String styFrame
Property with the value of the sty attribute for the frame of this instance transform output
-
styBody
protected java.lang.String styBody
Property with the value of the sty attribute for the body of this instance transform output
-
tyFrame
protected java.lang.String tyFrame
Property with the value of the ty attribute for the frame of this instance transform output
-
tyBody
protected java.lang.String tyBody
Property with the value of the ty attribute for the body of this instance transform output
-
scriptClassFrame
protected java.lang.String scriptClassFrame
Property with the value of the scriptClass attribute for the frame of this instance transform output
-
scriptClassBody
protected java.lang.String scriptClassBody
Property with the value of the scriptClass attribute for the body of this instance transform output
-
-
Method Detail
-
renderTabFrame
public void renderTabFrame(MarkupOutput out)
Method that renders a frame for all the contents and sections of the bean that are to be displayed. CallsrenderTabFrameBody()
- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
isCurrentTab
public boolean isCurrentTab()
This method returns true whenever this Tab is selected.
When the Tab is selected, the output will be generated and displayed to the user. When the Tab is not selected, the output will still be generated, but it will not get displayed (it will get displayed when the user selects the Tab in the TabManager using javascript).
This method will determine if the Tab is selected by comparing theTabManagerBean
'scurrentTab
with theTabBean
'sgetTabRepresented
. This method will returntrue
also for those cases when there is noTabManagerBean
.- Returns:
- boolean true when this is the current tab
-
getTabManagerBean
protected TabManagerBean getTabManagerBean()
Returns the TabManagerBean for this Tab. By default, this method just checks whether the parent is a TabManagerBean and returns it if so.- Returns:
- TabManagerBean controlling this Tab.
-
getTabBean
protected TabBean getTabBean()
Returns the TabBean for this tab.- Returns:
- TabBean for this tab.
- Since:
- MicroStrategy Web 8.1.0
-
renderContents
public void renderContents(MarkupOutput out)
Method that renders a frame for the main contents of the transform, according to the information available on the bean. CallsrenderContentsBody()
- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderContentsBody
public abstract void renderContentsBody(MarkupOutput out)
Method that renders the main contents of the transform, according to the information available on the bean. This method can be customized if users would like to obtain a different output for the same given bean.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderTabSectionTitle
@Deprecated public void renderTabSectionTitle(MarkupOutput out, java.lang.String title)
Deprecated.please use getFieldSetTag insteadConvenience method that displays the HTML required for rendering the title of a section.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.title
-String
that will be displayed as title
-
getFieldSetTag
public Tag getFieldSetTag(java.lang.String title)
Convenience method that builds and returns a fieldset html tag.- Parameters:
title
-String
that will be displayed as the title- Returns:
- fieldSet tag
- Since:
- MicroStrategy Web 9.0.0
-
renderJavascriptLinks
public void renderJavascriptLinks(MarkupOutput out)
Used to dynamically include links to js files. Extend with the list of files your transform requires.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
getSupportedBeanType
public java.lang.Class getSupportedBeanType()
Returns the supported bean type. This transform supports any of theTabBean
instances- Specified by:
getSupportedBeanType
in interfaceTransform
- Overrides:
getSupportedBeanType
in classAbstractAppTransform
- Returns:
- the class of the bean supported by this transform.
-
getDescription
public java.lang.String getDescription()
Returns the textual description of the transform- Returns:
- the description of the transform
-
transformForRequestSuccessful
public void transformForRequestSuccessful(MarkupOutput out)
Transforms the assosciatedTabBean
when its status isEnumRequestStatus.WebBeanRequestSuccessful
. CallsrenderTabFrame()
- Specified by:
transformForRequestSuccessful
in classAbstractAppTransform
- Parameters:
out
-MarkupOutput
instance where the contents of this transform will be saved.- See Also:
AbstractAppTransform.checkStatus(com.microstrategy.web.beans.MarkupOutput)
-
renderDropdown
public void renderDropdown(MarkupOutput out, java.lang.String cmdId, java.lang.String cmdValue, ShortcutList picker, java.lang.String value)
This method renders a single dropdown list to be used within a tab.- Parameters:
out
- MarkupOutput where the content should be generatedcmdId
- the dropdown's command idcmdValue
- the dropdown's current command value.picker
- the ShortcutList for the picker.value
- the dropdown current value.
-
renderColorDropdown
public void renderColorDropdown(MarkupOutput out, java.lang.String cmdId, java.lang.String cmdValue, ShortcutList picker)
This method renders a single dropdown to be used with a color picker- Parameters:
out
- MarkupOutput where the content should be generatedcmdId
- the dropdown's command idcmdValue
- the dropdown's current command value.picker
- the ShortcutList for the picker.
-
renderFlashWarning
public void renderFlashWarning(MarkupOutput out)
Generates the HTML with a label that reads '(Flash Only)'. The label is invisible until the Tab Bone decides to make it visible.
- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.- Since:
- MicroStrategy Web 8.1.0
-
getDropDownTag
protected Tag getDropDownTag(java.lang.String cmdId, java.lang.String cmdValue, ShortcutList picker, java.lang.String type)
- Since:
- MicroStrategy Web 9.0.0
-
addPicker
protected void addPicker(ShortcutList picker)
-
getPickerId
protected java.lang.String getPickerId(ShortcutList picker)
-
renderPickers
protected void renderPickers(MarkupOutput out)
This method needs to be overriden by those Transforms that has a picker. By default nothing is rendered- Parameters:
out
-MarkupOutput
instance where the contents of this transform will be generated.
-
initializeJavaScriptAttributes
public void initializeJavaScriptAttributes()
For JavaScript, certain properties are required to be added to the HTML tags to generate for its integration with the code generated for the feature to work in DHTML environments. This method assigns values to these attributes, so they can be displayed together with the tags they represent. If a value is set to be null, it won't be included on the HTML tag definition. By default, it includes the definition of values for properties such asstyFrame
,tyFrame
andscriptClassFrame
.
-
initializeCss
public void initializeCss()
Initializes the Css Classes to use. For each one of the css classes to use, the prefix indicated on the formal parameter is added to the name of the class to use.- Overrides:
initializeCss
in classAbstractAppTransform
-
initializeTransform
public void initializeTransform(Transformable data)
This method initialize the private and protected fields of the transform. In particular it invokes theinitializeJavaScriptAttribute()
method.- Specified by:
initializeTransform
in interfaceAppTransform
- Overrides:
initializeTransform
in classAbstractAppTransform
- Parameters:
data
-Transformable
instance to be transformed.
-
getAttributesFrame
protected java.util.Map getAttributesFrame()
This method return a Map (name/value pairs) of attributes to use for the div enclosing the content of the Tab. These attributes include those required for javascript and formatting (for example, "sty", "ty" and "scriptclass").- Returns:
- Map with HTML attributes for the body div.
-
isIFrameEnabled
protected boolean isIFrameEnabled()
Whether iframe update technology is enabled for this Transform.- Overrides:
isIFrameEnabled
in classAbstractAppTransform
- Returns:
- whether iframe is enabled
- Since:
- MicroStrategy Web 9.0.0
-
getAttributesBody
protected java.util.Map getAttributesBody()
This method return a Map (name/value pairs) of attributes to use for the div enclosing the body of the Tab. These attributes include those required for javascript and formatting (for example, "sty", "ty" and "scriptclass").- Returns:
- Map with HTML attributes for the body div.
-
getArgumentName
protected java.lang.String getArgumentName(WebEvent event, int argumentId)
Get the name of the argument assigned to theWebEvent
, based on the indicated id. This method can be overwritten with an event-argumentId mapping in case the original event defined on the application is customized.- Overrides:
getArgumentName
in classAbstractAppTransform
- Parameters:
event
-WebEvent
from where the argument name will be retrievedargumentId
-int
with the identifier of the argument to search for on the event- Returns:
- the corresponding name of the event for the specified id. If it is
not found, it will return
null
.
-
addJSValidationInfo
public void addJSValidationInfo(Tag inputTag, java.lang.String type, java.lang.String min, java.lang.String max, java.lang.String name, java.lang.String errorMsg)
Add the necessary JavaScript validation information- Parameters:
inputTag
- Tag the Tag where the infortmation will be addedtype
- String The type pof data to validate ('1'- Integer; '2'- float)min
- String The minimum number allowedmax
- String The maximum number allowedname
- String The name of the field. (Used on the error message)errorMsg
- String The error message to display. This is only needed for custom messages, if no message is specified, the default one will be used.
-
getLabelTag
protected Tag getLabelTag(java.lang.String attFor, java.lang.String labelDescriptor)
- Since:
- MicroStrategy Web 8.1.0
-
renderSingleOption
protected void renderSingleOption(MarkupOutput out, java.lang.String cmdId, java.lang.String propertyValue, java.lang.String msg, boolean isDisabled)
- Since:
- MicroStrategy Web 8.1.0
-
renderSingleOption
protected void renderSingleOption(MarkupOutput out, java.lang.String cmdId, boolean checked, java.lang.String msg, boolean isDisabled, boolean setCmdValue)
- Since:
- MicroStrategy Web 8.1.0
-
AddJSValidationInfo
@Deprecated public void AddJSValidationInfo(Tag inputTag, java.lang.String type, java.lang.String min, java.lang.String max, java.lang.String name, java.lang.String errorMsg)
Deprecated.Add the necessary JavaScript validation information- Parameters:
inputTag
- Tag the Tag where the infortmation will be addedtype
- String The type pof data to validate ('1'- Integer; '2'- float)min
- String The minimum number allowedmax
- String The maximum number allowedname
- String The name of the field. (Used on the error message)errorMsg
- String The error message to display. This is only needed for custom messages, if no message is specified, the default one will be used.
-
-