java.lang.Object | ||
↳ | com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder | |
↳ | com.microstrategy.web.app.transforms.contextmenus.AbstractPagebyContextMenuItemBuilder |
![]() |
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:
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) { super(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'")); __result.setImageType(EnumMenuImages.MenuImageRemove); return __result; } }
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractPagebyContextMenuItemBuilder(Shortcut definition) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
isItemAvailable(TransformContext context)
Returns true if the bean can be edited and the corresponding action is enabled.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getBoneID(TransformContext context)
Returns the bone-id used with this context-menu
| ||||||||||
String |
getContextMenusScript(TransformContext context, String args)
Returns the javascript used to process the context-menus.
| ||||||||||
String |
getContextMenusScript(TransformContext context)
Returns the javascript used to process the context-menus.
| ||||||||||
PageByUnit |
getPageByUnit(TransformContext context)
Helper method to retrieve the PageByUnit from the context.
| ||||||||||
PageByTransform |
getTransform(TransformContext context)
Helper method to retrieve the PageByTransform from the context.
| ||||||||||
abstract boolean |
isActionEnabled(TransformContext context)
Indicates the abstract class if the specific action of this item is available.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Returns true if the bean can be edited and the corresponding action is enabled.
context | TransformContext with context information. |
---|
true
if the context-menu-item is available and should be included.
Returns the bone-id used with this context-menu
Returns the javascript used to process the context-menus.
Returns the javascript used to process the context-menus.
Helper method to retrieve the PageByUnit from the context.
Helper method to retrieve the PageByTransform from the context.
Indicates the abstract class if the specific action of this item is available.