Class RibbonToolbarTransform
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractTransform
-
- com.microstrategy.web.transform.AbstractLayoutTransform
-
- com.microstrategy.web.app.transforms.AbstractAppTransform
-
- com.microstrategy.web.app.transforms.AbstractAppWidgetTransform
-
- com.microstrategy.web.app.transforms.GuiElementsBlockTransform
-
- com.microstrategy.web.app.transforms.RibbonToolbarTransform
-
- All Implemented Interfaces:
AppTransform
,LayoutTransform
,Transform
- Direct Known Subclasses:
DocumentToolbarTransform
,MenuBlockTransform
,MojoToolbarTransform
public class RibbonToolbarTransform extends GuiElementsBlockTransform
The RibonToolbarTransform class contains inner classes and utility methods for the toolbar rendering- Since:
- MicroStrategy Web 9.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
AbstractAppTransform.Context
-
-
Field Summary
-
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 RibbonToolbarTransform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBackHistoryItemsToModel(Block baseBlock)
void
addForwardHistoryItemsToModel(Block baseBlock)
void
addPageHistoryItemsToModel(Block baseBlock, boolean isBackList)
java.util.Enumeration<WebObjectInfo>
getAllGridStyles()
Used to retrieve the grid autostylesjava.lang.String
getAutostyleIcon(WebObjectInfo oi)
Method that generates a unique style class based on the WebObjectInfo id Implementation: " mstrLayoutItem style_" + oi.getID();java.lang.String
getBeanPath()
Returns the path within the application of the WebBean being transformed.java.lang.String
getDefaultTargetPath()
Returns the targetPath specified on the pageConfig fileprotected java.lang.String
getListName()
protected RibbonList
getRibbonsFromPageConfig(java.lang.String listName)
Get the list of ribbons from the page config using the page nameint
getSelectedToolbarId()
Returns the id of the selected toolbar, usually stored as a user preference value that will be updated every time the user changes the selected toolbar, to keep track of the last selection.protected java.lang.String
getToolbarName()
protected java.lang.String
getToolbarPreferenceName()
Method that returns the name of the preference used to store the last selected toolbar, used by getSelectedToolbarId()protected void
includeLayout(java.lang.String layouts, Block contextBlock)
Using the name of a layout it invokes the methods contained in it at any timeboolean
isToolbarEnabled(java.lang.String tb)
Determines if the tab for the supplied toolbar name should be visible.boolean
isToolbarSelected(java.lang.String tb)
Determines if the toolbar is currently selected.void
loadResolvedFeatures(Block baseModel)
void
loadRibbon(Block ribbonModel)
Will load the basic structure of the ribbon, from the pageConfig.void
loadRibbonView(Block ribbonView)
The ribbon contains two blocks, the view and the model.void
loadSelectedModel(Block ribbonModel)
Replaces the model placeholder with the real toolbar model based on the selected toolbar preference, after filling the ribbon (tabs and toolbars) we need to populate the first toolbar, the selected toolbar.void
processToolbarEvents(Block b)
This method generates the resolved links for any toolbar buttons with events.void
removeToolbarEvents(Block tb)
This method removes toolbar button Event information that is not needed client-side.void
toolbarTaskLoad(Block baseBlock)
Will set the desired blockModel on the baseBlock, depending on the requested toolbar.-
Methods inherited from class com.microstrategy.web.app.transforms.GuiElementsBlockTransform
getAutoStyles, getDescription, getElementID, getElementName, getListAttribute, getPicker, getPickerList, getRequestKeyValue, getRequestParameterValue, getRequestParameterValueEncoded, getShortcutDescriptor, isFeatureAvailable, removeListItems
-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractAppWidgetTransform
buildFlattenedExpression, getAttForms, getChildWidget, getChildWidget, getCssName, getIserverNodeFunction, getObjectInfoCssName, getPreferenceValueReplaceNull, getSelf, includeAncestorInfo, includeFolderInfo, includeOwnerInfo, includeTimeInfo, insertChildren, inTreeStructure, isNull, isShowObjectTags, renderShell, renderTest, transformForRequestSuccessful
-
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, getArgumentName, getAttributesShellDiv, 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, getSupportedBeanType, getTagsFactory, getTimeFormat, getUnitsLabel, getWebBeanErrorInfo, hasSubBlock, initHeightAndWidthFromPreferences, initializeCss, initializeImages, initializeTransform, initializeWebComponent, is508, isBlockMode, isContextMenusEnabled, isDhtml, isDialog, isDormant, isIFrameDisplayMode, isIFrameEnabled, isIFrameRequest, isJobExpired, isModal, isOpen, isPortlet, isTrue, localIsIFrameDisplayMode, newContext, newHiddenInputBuilder, newNamespaceEncoder, newURIBuilder, 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, 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.LayoutTransform
getLayoutDefinition, setLayoutDefinition
-
Methods inherited from interface com.microstrategy.web.transform.Transform
canTransform, getFormalParams, getID, getPreview, getSupportedBeanType, isPreviewAvailable, isResolved, supports, supports, transform
-
-
-
-
Method Detail
-
getSelectedToolbarId
public int getSelectedToolbarId()
Returns the id of the selected toolbar, usually stored as a user preference value that will be updated every time the user changes the selected toolbar, to keep track of the last selection.- Returns:
- String that represents the id of the toolbar
-
getDefaultTargetPath
public java.lang.String getDefaultTargetPath()
Returns the targetPath specified on the pageConfig file- Returns:
- the targetPath
-
getBeanPath
public java.lang.String getBeanPath()
Description copied from class:AbstractAppTransform
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.- Overrides:
getBeanPath
in classAbstractAppTransform
- Returns:
- String
- See Also:
WebComponent.getPath()
,AbstractAppTransform.renderRegisterBone(com.microstrategy.web.beans.MarkupOutput)
-
isToolbarSelected
public boolean isToolbarSelected(java.lang.String tb)
Determines if the toolbar is currently selected.- Parameters:
tb
- String The local name of the toolbar (e.g. Home, Tools, Format, etc).- Returns:
- Boolean True if the toolbar is currently selected.
-
isToolbarEnabled
public boolean isToolbarEnabled(java.lang.String tb)
Determines if the tab for the supplied toolbar name should be visible.- Parameters:
tb
- String the local name of the toolbar (e.g. Home, Tools, Format, etc).- Returns:
- Boolean True if the tab for this toolbar should be visible.
-
removeToolbarEvents
public void removeToolbarEvents(Block tb)
This method removes toolbar button Event information that is not needed client-side.- Parameters:
tb
- Block The ToolbarModel Block for event information removal.
-
processToolbarEvents
public void processToolbarEvents(Block b)
This method generates the resolved links for any toolbar buttons with events.- Parameters:
b
- Block The RibbonToolbarModel Block to search for events.
-
getAllGridStyles
public java.util.Enumeration<WebObjectInfo> getAllGridStyles()
Used to retrieve the grid autostyles- Returns:
- an Enumeration
that holds all the valid grid autostyles
-
getAutostyleIcon
public java.lang.String getAutostyleIcon(WebObjectInfo oi)
Method that generates a unique style class based on the WebObjectInfo id Implementation: " mstrLayoutItem style_" + oi.getID();- Parameters:
oi
-- Returns:
- String that shall be used for the style class for the tile of the autostyle pulldown
-
getToolbarPreferenceName
protected java.lang.String getToolbarPreferenceName()
Method that returns the name of the preference used to store the last selected toolbar, used by getSelectedToolbarId()- Returns:
- the preference name
-
getListName
protected java.lang.String getListName()
-
getToolbarName
protected java.lang.String getToolbarName()
-
toolbarTaskLoad
public void toolbarTaskLoad(Block baseBlock) throws java.lang.Exception
Will set the desired blockModel on the baseBlock, depending on the requested toolbar. This method will be used tipically by the ToolbarRequestLoader that is the layout that the task uses to populate the on demand toolbars- Parameters:
baseBlock
-- Throws:
java.lang.Exception
-
loadRibbon
public void loadRibbon(Block ribbonModel) throws java.lang.Exception
Will load the basic structure of the ribbon, from the pageConfig. The ribbon is the mix of tabs, menus and toolbars. This method will be called typically by the ReportToolbarLayout or the DocumentToolbarLayout- Parameters:
ribbonModel
- Block of RibbonToolbarModel type- Throws:
java.lang.Exception
-
loadRibbonView
public void loadRibbonView(Block ribbonView) throws java.lang.Exception
The ribbon contains two blocks, the view and the model. This method is used to populate the view block of the ribbon. The method will fill the viewStack with toolbar blocks.- Parameters:
ribbonView
-- Throws:
java.lang.Exception
-
loadSelectedModel
public void loadSelectedModel(Block ribbonModel) throws java.lang.Exception
Replaces the model placeholder with the real toolbar model based on the selected toolbar preference, after filling the ribbon (tabs and toolbars) we need to populate the first toolbar, the selected toolbar. This method will be called typically by the ReportToolbarLayout or the DocumentToolbarLayout- Parameters:
ribbonModel
-- Throws:
java.lang.Exception
-
loadResolvedFeatures
public void loadResolvedFeatures(Block baseModel) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getRibbonsFromPageConfig
protected RibbonList getRibbonsFromPageConfig(java.lang.String listName)
Get the list of ribbons from the page config using the page name- Parameters:
page
-
-
includeLayout
protected void includeLayout(java.lang.String layouts, Block contextBlock) throws WebTransformException, MalformedMethodException
Using the name of a layout it invokes the methods contained in it at any time- Parameters:
layouts
- list of comma separated layout pathscontextBlock
- block that will be the root block of the layout context while invoking the layout render- Throws:
WebTransformException
MalformedMethodException
-
addBackHistoryItemsToModel
public void addBackHistoryItemsToModel(Block baseBlock)
-
addForwardHistoryItemsToModel
public void addForwardHistoryItemsToModel(Block baseBlock)
-
addPageHistoryItemsToModel
public void addPageHistoryItemsToModel(Block baseBlock, boolean isBackList)
-
-