Class AbstractPagebyContextMenuItemBuilder

  • All Implemented Interfaces:
    Direct Known Subclasses:
    PageByAttrForms, PageByDelete, PageByHyperLinkEdit, PageByHyperLinkNavigation, PageByPivot, PageByProperties, PageByRemove, PageByRename, PageBySort, ReportPageByCellDrill

    public abstract class AbstractPagebyContextMenuItemBuilder
    extends ContextMenu.DefaultContextMenuItemBuilder

    This class is used by Microstrategy Web as a base class for those used to populate context-menus used with the PageBy transform. It provides convenience methods and common functionality shared by these classes.

    New context-menus-builders can be created simply by extending this class and implementing/overriding these methods:

    1. createItem(): The default method that creates the context-menu item.
    2. isActionEnabled(): To indicate this class if the specific action associated with this item is available.

    The following would be an example of a subclass used to populate an "Remove" context-menu-item:

     public class PageByRemove extends AbstractPagebyContextMenuItemBuilder {
         public PageByRemove(Shortcut definition) {
         public boolean isActionEnabled(TransformContext context) {
             PageByUnit unit = getPageByUnit(context);
             if (unit == null) return false;
             return unit.isRemoveAvailable();
         public ContextMenuItem createItem(TransformContext context) {
             ContextMenuItem __result = super.createItem(context);
             __result.setJSCode(getContextMenusScript(context, "'rmv'"));
             return __result;
    MicroStrategy Web 8.0.1
    • Constructor Detail

      • AbstractPagebyContextMenuItemBuilder

        public AbstractPagebyContextMenuItemBuilder​(Shortcut definition)
    • Method Detail

      • getPageByUnit

        protected PageByUnit getPageByUnit​(TransformContext context)
        Helper method to retrieve the PageByUnit from the context.
      • getBoneID

        protected java.lang.String getBoneID​(TransformContext context)
        Returns the bone-id used with this context-menu
      • getContextMenusScript

        protected java.lang.String getContextMenusScript​(TransformContext context)
        Returns the javascript used to process the context-menus.
      • getContextMenusScript

        protected java.lang.String getContextMenusScript​(TransformContext context,
                                                         java.lang.String args)
        Returns the javascript used to process the context-menus.
      • isActionEnabled

        protected abstract boolean isActionEnabled​(TransformContext context)
        Indicates the abstract class if the specific action of this item is available.