public class

RibbonToolbarTransform

extends GuiElementsBlockTransform
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
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

The RibonToolbarTransform class contains inner classes and utility methods for the toolbar rendering

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractAppTransform
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Public Constructors
RibbonToolbarTransform()
Public Methods
void addBackHistoryItemsToModel(Block baseBlock)
void addForwardHistoryItemsToModel(Block baseBlock)
void addPageHistoryItemsToModel(Block baseBlock, boolean isBackList)
Enumeration<WebObjectInfo> getAllGridStyles()
Used to retrieve the grid autostyles
String getAutostyleIcon(WebObjectInfo oi)
Method that generates a unique style class based on the WebObjectInfo id Implementation: " mstrLayoutItem style_" + oi.getID();
String getBeanPath()
Returns the path within the application of the WebBean being transformed.
String getDefaultTargetPath()
Returns the targetPath specified on the pageConfig file
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.
boolean isToolbarEnabled(String tb)
Determines if the tab for the supplied toolbar name should be visible.
boolean isToolbarSelected(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.
Protected Methods
String getListName()
RibbonList getRibbonsFromPageConfig(String listName)
Get the list of ribbons from the page config using the page name
String getToolbarName()
String getToolbarPreferenceName()
Method that returns the name of the preference used to store the last selected toolbar, used by getSelectedToolbarId()
void includeLayout(String layouts, Block contextBlock)
Using the name of a layout it invokes the methods contained in it at any time
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.GuiElementsBlockTransform
From class com.microstrategy.web.app.transforms.AbstractAppWidgetTransform
From class com.microstrategy.web.app.transforms.AbstractAppTransform
From class com.microstrategy.web.transform.AbstractLayoutTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.app.transforms.AppTransform
From interface com.microstrategy.web.transform.LayoutTransform
From interface com.microstrategy.web.transform.Transform

Public Constructors

public RibbonToolbarTransform ()

Public Methods

public void addBackHistoryItemsToModel (Block baseBlock)

public void addForwardHistoryItemsToModel (Block baseBlock)

public void addPageHistoryItemsToModel (Block baseBlock, boolean isBackList)

public Enumeration<WebObjectInfo> getAllGridStyles ()

Used to retrieve the grid autostyles

Returns
  • an Enumeration that holds all the valid grid autostyles

public String getAutostyleIcon (WebObjectInfo oi)

Method that generates a unique style class based on the WebObjectInfo id Implementation: " mstrLayoutItem style_" + oi.getID();

Returns
  • String that shall be used for the style class for the tile of the autostyle pulldown

public String getBeanPath ()

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

Returns
  • String

public String getDefaultTargetPath ()

Returns the targetPath specified on the pageConfig file

Returns
  • the targetPath

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

public boolean isToolbarEnabled (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.

public boolean isToolbarSelected (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.

public void loadResolvedFeatures (Block baseModel)

Throws
Exception

public void loadRibbon (Block ribbonModel)

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
Exception

public void loadRibbonView (Block ribbonView)

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.

Throws
Exception

public 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. This method will be called typically by the ReportToolbarLayout or the DocumentToolbarLayout

Throws
Exception

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.

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.

public void toolbarTaskLoad (Block baseBlock)

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

Throws
Exception

Protected Methods

protected String getListName ()

protected RibbonList getRibbonsFromPageConfig (String listName)

Get the list of ribbons from the page config using the page name

protected String getToolbarName ()

protected String getToolbarPreferenceName ()

Method that returns the name of the preference used to store the last selected toolbar, used by getSelectedToolbarId()

Returns
  • the preference name

protected void includeLayout (String layouts, Block contextBlock)

Using the name of a layout it invokes the methods contained in it at any time

Parameters
layouts list of comma separated layout paths
contextBlock block that will be the root block of the layout context while invoking the layout render
Throws
WebTransformException
MalformedMethodException
WebTransformException