public class

Shortcut

extends AbstractConfigurationElement
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.app.Shortcut

Class Overview

The Shortcut is a multi-purpose class used to configure elements that generate all sort of links or shortcuts, like menu items, drop-down lists and context menu items.

Summary

Constants
String ATT_ACTIVE_FEATURE_ID
String ATT_APPEND_STATE
String ATT_BASE_BEAN
String ATT_BASE_BONE
String ATT_BUILDER_CLASS_NAME
String ATT_CHECK_FEATURE_ID
String ATT_DESC
String ATT_DESC_ID
String ATT_DHTML_CHECKED
String ATT_DHTML_ENABLED
String ATT_DHTML_SHOW
String ATT_DYN_ALL_SUBMENU
String ATT_DYN_SUBMENU
String ATT_ENABLE_FEATURE_ID
String ATT_EXTRA_URL
String ATT_FEATURE_ID
String ATT_FEATURE_TARGET
String ATT_HREF
String ATT_IFRAME
String ATT_IMG_HEIGHT
String ATT_IMG_SRC
String ATT_IMG_WIDTH
String ATT_KEY_SHORTCUT_DESC
String ATT_KEY_SHORTCUT_DESC_ID
String ATT_LOCATION
String ATT_NAME
String ATT_ONCLICK
String ATT_SCOPE
String ATT_SELECTED
String ATT_SHORTCUT_CLASS_NAME
String ATT_TARGET
String ATT_TEXTCOMBO_TOOLTIP_DESC_ID
String ATT_TYPE
String ATT_USE_WINDOW_OPEN
int LOCATION_DEFAULT
int LOCATION_PREFIX
int LOCATION_SUFFIX
String NODE_SHORCUT constant for the shortcut node name
String SHORTCUT_TARGET_TYPE_EXPORT_WINDOW
int TYPE_BEAN
int TYPE_BUTTON
int TYPE_BUTTON_LABEL button with label
int TYPE_CAPTION
int TYPE_CHECKBOX
int TYPE_COLOR_PICKER_PANE
int TYPE_COMBO
int TYPE_DEFAULT
int TYPE_LABEL label button
int TYPE_PICKER Generic Picker as submenu
int TYPE_PICKER_OPTION picker option
int TYPE_PULLDOWN
int TYPE_RADIO
int TYPE_TEXTBOX
int TYPE_TEXT_COMBO combo + text label
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
Shortcut()
Class constructor.
Shortcut(String name, String href, String desc)
Class constructor.
Shortcut(String name, String href, String desc, String descID, boolean isSelected)
Class constructor.
Shortcut(Node root)
Class constructor.
Public Methods
void addShortcutEvent(ShortcutEvent evt)
void addSubItem(Shortcut shortcut)
Add a shortcut item as a child of the shortcut list node in the current shortcut.
boolean appendState()
Returns whether the shortcut needs to append the page state.
boolean fromDefault()
This method is deprecated. This proprety is not used and it will be removed in future versions.
String getActiveFeatureId()
Get the active featureId property value of the Shortcut instance.
WebAttributeList getAttributeList()
Get the attribute list for the instance
String getBaseBean()
Returns the name of the bean associated with the shortcut object.
String getBaseBone()
Returns the name of a JavaScript bone with which the shortcut is associated.
Object getBuilder()
Returns an instance of the class specified by the "builder-class-name" attribute.
String getBuilderClassName()
When used as part of context-menus, returns the fully qualified name of the class used to populate context-menus that uses this Shortcut as definition
String getCheckFeatureId()
Get the check featureId property value of the Shortcut instance.
String getDescriptor()
Returns a descriptor that the application should use to display the shortcut if the desc-id attribute is missing.
String getDescriptorID()
Returns the Resource Bundle item id that the application should use to display the shortcut in the language of the user's locale.
String getDhtmlChecked()
Returns a javascript code that is evaluated to determine whether the shortcut should appear checked or unchecked when it is displayed.
String getDhtmlEnabled()
Represents a javascript code that is evaluated to determine whether the shortcut should appear enabled or disabled when it is displayed.
String getDhtmlShow()
Represents a javascript code that is evaluated to determine whether the shortcut should be displayed.
boolean getDynamicAllSubMenu()
String getDynamicSubMenu()
String getEnableFeatureId()
Get the enable featureId property value of the Shortcut instance.
HashList getEvents()
This method is deprecated. Use getShortcutEvents()
HashList getEvents(boolean isChecked)
Returns the HashList of ShortcutEvents associated with the shortcut
WebBeanPropertyList getExtendedPropertiesList()
Get the attribute list for the instance
String getExtraUrl()
Returns a URL segment that is appended to the links URL.
String getFeatureId()
Represents a feature that is evaluated at the server to determine whether the object should be displayed.
String getFeatureTarget()
Returns the name of a feature that is evaluated to determine whether the target of this shortcut should be used.
String getHREF()
Indicates the HTTP location to which the browser is directed when the shortcut link is clicked.
String getImgHeight()
If the shortcut is represented as an image, this property indicates the height of the image.
String getImgSrc()
If the shortcut is represented as an image, the ImgSrc indicates the source path of the image.
String getImgWidth()
If the shortcut is represented as an image, this property indicates the width of the image.
String getKeyShortcutDesc()
Returns a descriptor that the application should use to display the accelerator key (keyboard shortcut) if the key-shortcut-desc-id attribute is missing.
String getKeyShortcutDescID()
Returns the Resource Bundle item id that the application should use to display the accelerator key (keyboard shortcut) in the language of the user's locale.
String getKeyShortcutString(Messages messages)
Returns the object's localized Shortcut descriptor.
int getLocation()
When rendering multi-column system pickers, the location property indicates whether this shortcut is rendered before or after the rest of the shortcuts, outside the columns block.
String getName()
Returns the name, a unique identifier for this shortcut.
String getOnclick()
Represents the javascript code that is evaluated when the shortcut link is clicked.
String getScope()
String getShortCutClassName()
When used inside a toolbar definition, returns the fully qualified name of the class to use when building toolbar items using the shortcut definition.
AbstractConfigurationElement.FilteredList getShortcutEvents()
Get the list of events
String getString(Messages messages)
Returns the object's localized descriptor.
ShortcutList getSubitemList()
Get a single list of sub-items for this Shortcut.
ShortcutList getSubtemList()
This method is deprecated. Use getSubitemList()
String getTarget()
Returns the value of the target property as saved in the configuration file.
String getTarget(WebComponent root)
This method is deprecated. use resolveTarget(WebComponent root) instead
String getTargetUrl(WebComponent root, boolean useCheckedEvent, WebFeatures featureManager)
Returns the url associated with the shortcut
String getTargetUrl(WebComponent root, boolean useCheckedEvent, boolean includeState, WebFeatures featureManager)
Returns the url associated with the shortcut
String getTargetUrlParameters(WebComponent root, boolean useCheckedEvent, boolean includeState, WebFeatures featureManager)
Returns the url associated with the shortcut without including the servlet information.
String getTooltipDescriptorID()
Returns the Resource Bundle item id that the application should use to display textCobmo tooltip on the shortcut
int getType()
When used inside a toolbar definition, specifies the type of tool the shortcut represents:
  • TYPE_BUTTON : an image-only button.
boolean hasSubItems()
Returns true if the shortcut has shorcuts associated with it
boolean isIframe()
When true, the shortcut link uses the application's asynchronous page update infrastructure through iframe to submit the users request to the Web server.
boolean isSelected()
Indicates that the shortcut is rendered as the selected item among the other links in the shortcut list.
boolean isShortcutActive(WebFeatures featureManager, WebComponent root)
Returns true if the shortcut is active
boolean isShortcutAvailable(WebFeatures featureManager, WebComponent root)
Returns true if the shortcut is available to the user
boolean isShortcutChecked(WebFeatures featureManager, WebComponent root)
Returns true if the shortcut will appear to the user as selected
boolean isShortcutEnabled(WebFeatures featureManager, WebComponent root)
Returns true if the shortcut is enabled
boolean isShortcutTargetAvailable(WebFeatures featureManager, WebComponent root)
Returns true if the shortcut's target is available to the user
void removeShortcutList(Object key)
void removeSubItem(Object key)
Remove the shortcut with the given key if it exists as a child for this shortcut.
String resolveTarget(WebComponent root)
Returns the runtime value of the target property.
void setActiveFeatureId(String active_featureId)
Set the active featureId property value of the Shortcut instance.This feature is used to decide if we need to do any action on clicking on the short cut item in the menu.
void setAppendState(boolean newValue)
Sets whether the shortcut needs to append the page state.
void setBaseBean(String value)
Indicates the bean from the pages bean hierarchy associated with the shortcut object.
void setBaseBone(String value)
Defines the name of a JavaScript bone with which the shortcut is associated.
void setBuilderClassName(String value)
When used as part of context-menus, sets the fully qualified name of the class used to populate context-menus that uses this Shortcut as definition
void setCheckFeatureId(String check_featureId)
Set the check featureId property value of the Shortcut instance.This feature is used to decide if we need to show a check mark next to the short cut in the menu.
void setDescriptor(String descriptor)
Provides a descriptor that the application should use to display the shortcut if the desc-id attribute is missing.
void setDescriptorID(String descriptorID)
Provides the Resource Bundle item id that the application should use to display the shortcut in the language of the user's locale.
void setDhtmlChecked(String value)
Sets a javascript code that is evaluated to determine whether the shortcut should appear checked or unchecked when it is displayed.
void setDhtmlEnabled(String value)
Sets the javascript code that is evaluated to determine whether the shortcut should appear enabled or disabled when it is displayed.
void setDhtmlShow(String value)
/** Sets the javascript code that is evaluated to determine whether the shortcut should be displayed.
void setDynamicAllSubMenu(boolean value)
void setDynamicSubMenu(String value)
void setEnableFeatureId(String enable_featureId)
Set the enable featureId property value of the Shortcut instance.This feature is used to decide if we need to enable or disable the short cut in the menu.
void setExtraUrl(String newValue)
Defines a URL segment that is appended to the links URL.
void setFeatureId(String featureId)
Sets the name of a feature that is evaluated at the server to determine whether the object should be displayed.
void setFeatureTarget(String featureTarget)
Sets the name of a feature that is evaluated to determine whether the target of this shortcut should be used.
void setFromDefault(boolean newValue)
This method is deprecated. This proprety is not used and it will be removed in future versions.
void setHREF(String href)
Indicates the HTTP location to which the browser is directed when the shortcut link is clicked.
void setImgHeight(String imgHeight)
If the shortcut is represented as an image, this property indicates the height of the image.
void setImgSrc(String imgSrc)
If the shortcut is represented as an image, this property indicates the source path of the image.
void setImgWidth(String imgWidth)
If the shortcut is represented as an image, this property indicates the width of the image.
void setIsIframe(boolean iframe)
When set to true, the shortcut link uses the application's asynchronous page update infrastructure through iframe to submit the users request to the Web server.
void setIsSelected(boolean newValue)
Indicates whetther the shortcut is rendered as the selected item among the other links in the shortcut list.
void setKeyShortcutDesc(String value)
Provides a descriptor that the application should use to display the accelerator key (keyboard shortcut) if the key-shortcut-desc-id attribute is missing.
void setKeyShortcutDescID(String value)
Provides the Resource Bundle item id that the application should use to display the accelerator key (keyboard shortcut) in the language of the user's locale.
void setLocation(int location)
Set the location property value of the Shortcut instance.
void setName(String name)
Sets the name, a unique identifier for this shortcut.
void setOnclick(String value)
Sets some javascript code that is evaluated when the shortcut link is clicked.
void setScope(String value)
void setShortCutClassName(String value)
When used inside a toolbar definition, specifies the fully qualified name of the class to use to render the tool.
void setShortcutList(ShortcutList shortcutList)
void setTarget(String target)
Set the target property value of the Shortcut instance.
void setTooltipDescriptorID(String ttDescriptorID)
Provides the Resource Bundle item id that the application should use to display textCobmo tooltip on the shortcut
void setType(int type)
Set the type property value of the Shortcut instance.
void setUseWindowOpen(boolean value)
If set to true and the target attribute is set to a value, the application uses window.open to open the target window specified by the target attribute.
boolean useWindowOpen()
If true and the target attribute is set to a value, the application uses window.open to open the target window specified by the target attribute.
Protected Methods
String getKeyAttribute()
This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.
ParameterBuilder newURIBuilder(WebComponent webComponent)
Convenience method to retrieve a new instance of a URI Builder from the connected Container Services object.
[Expand]
Inherited Methods
From class com.microstrategy.utils.config.AbstractConfigurationElement
From class java.lang.Object
From interface com.microstrategy.utils.config.ConfigurationElement
From interface com.microstrategy.utils.config.ConfigurationFile

Constants

public static final String ATT_ACTIVE_FEATURE_ID

Constant Value: "active-feature-id"

public static final String ATT_APPEND_STATE

Constant Value: "append-state"

public static final String ATT_BASE_BEAN

Constant Value: "base-bean"

public static final String ATT_BASE_BONE

Constant Value: "base-bone"

public static final String ATT_BUILDER_CLASS_NAME

Constant Value: "builder-class-name"

public static final String ATT_CHECK_FEATURE_ID

Constant Value: "check-feature-id"

public static final String ATT_DESC

Constant Value: "desc"

public static final String ATT_DESC_ID

Constant Value: "desc-id"

public static final String ATT_DHTML_CHECKED

Constant Value: "dhtml-checked"

public static final String ATT_DHTML_ENABLED

Constant Value: "dhtml-enabled"

public static final String ATT_DHTML_SHOW

Constant Value: "dhtml-show"

public static final String ATT_DYN_ALL_SUBMENU

Constant Value: "dyn-all"

public static final String ATT_DYN_SUBMENU

Constant Value: "dyn-menu"

public static final String ATT_ENABLE_FEATURE_ID

Constant Value: "enable-feature-id"

public static final String ATT_EXTRA_URL

Constant Value: "extra-url"

public static final String ATT_FEATURE_ID

Constant Value: "feature-id"

public static final String ATT_FEATURE_TARGET

Constant Value: "feature-target"

public static final String ATT_HREF

Constant Value: "href"

public static final String ATT_IFRAME

Constant Value: "iframe"

public static final String ATT_IMG_HEIGHT

Constant Value: "img-height"

public static final String ATT_IMG_SRC

Constant Value: "img-src"

public static final String ATT_IMG_WIDTH

Constant Value: "img-width"

public static final String ATT_KEY_SHORTCUT_DESC

Constant Value: "key-shortcut-desc"

public static final String ATT_KEY_SHORTCUT_DESC_ID

Constant Value: "key-shortcut-desc-id"

public static final String ATT_LOCATION

Constant Value: "location"

public static final String ATT_NAME

Constant Value: "name"

public static final String ATT_ONCLICK

Constant Value: "onclick"

public static final String ATT_SCOPE

Constant Value: "scope"

public static final String ATT_SELECTED

Constant Value: "selected"

public static final String ATT_SHORTCUT_CLASS_NAME

Constant Value: "shortcut-class-name"

public static final String ATT_TARGET

Constant Value: "target"

public static final String ATT_TEXTCOMBO_TOOLTIP_DESC_ID

Constant Value: "textCombo-tooltip-desc-id"

public static final String ATT_TYPE

Constant Value: "type"

public static final String ATT_USE_WINDOW_OPEN

Constant Value: "use-window-open"

public static final int LOCATION_DEFAULT

Constant Value: 0 (0x00000000)

public static final int LOCATION_PREFIX

Constant Value: 1 (0x00000001)

public static final int LOCATION_SUFFIX

Constant Value: 2 (0x00000002)

public static final String NODE_SHORCUT

constant for the shortcut node name

Constant Value: "shortcut"

public static final String SHORTCUT_TARGET_TYPE_EXPORT_WINDOW

Constant Value: "mstrExportWindow"

public static final int TYPE_BEAN

Constant Value: 7 (0x00000007)

public static final int TYPE_BUTTON

Constant Value: 1 (0x00000001)

public static final int TYPE_BUTTON_LABEL

button with label

Constant Value: 13 (0x0000000d)

public static final int TYPE_CAPTION

Constant Value: 8 (0x00000008)

public static final int TYPE_CHECKBOX

Constant Value: 5 (0x00000005)

public static final int TYPE_COLOR_PICKER_PANE

Constant Value: 9 (0x00000009)

public static final int TYPE_COMBO

Constant Value: 2 (0x00000002)

public static final int TYPE_DEFAULT

Constant Value: 0 (0x00000000)

public static final int TYPE_LABEL

label button

Constant Value: 14 (0x0000000e)

public static final int TYPE_PICKER

Generic Picker as submenu

Constant Value: 10 (0x0000000a)

public static final int TYPE_PICKER_OPTION

picker option

Constant Value: 12 (0x0000000c)

public static final int TYPE_PULLDOWN

Constant Value: 3 (0x00000003)

public static final int TYPE_RADIO

Constant Value: 6 (0x00000006)

public static final int TYPE_TEXTBOX

Constant Value: 4 (0x00000004)

public static final int TYPE_TEXT_COMBO

combo + text label

Constant Value: 11 (0x0000000b)

Public Constructors

public Shortcut ()

Class constructor. Initializes a new -empty- instance of the Shortcut class.

public Shortcut (String name, String href, String desc)

Class constructor. Initializes a new instance of the Shortcut class with the information given as parameters

Parameters
name unique name -identifier- for the shortcut.
href href property. Target address of the shortcut to display.
desc descriptor property.

public Shortcut (String name, String href, String desc, String descID, boolean isSelected)

Class constructor. Initializes a new instance of the Shortcut class with the information given as parameters

Parameters
name unique name -identifier- for the shortcut.
href href property. Target address of the shortcut to display.
desc descriptor property.
descID identifier of the descriptor to be used for the shortcut
isSelected boolean indicating whether the shortcut is to be initialized as selected

public Shortcut (Node root)

Class constructor. Initializes a Shortcut instance based on the information included on the XML Node

Parameters
root Node instance representing the Shortcut information.

Public Methods

public void addShortcutEvent (ShortcutEvent evt)

public void addSubItem (Shortcut shortcut)

Add a shortcut item as a child of the shortcut list node in the current shortcut.

Parameters
shortcut The shortcut node to be added as a subitem

public boolean appendState ()

Returns whether the shortcut needs to append the page state. The page state includes the state of all beans in the page so they can be restored in the server.

public boolean fromDefault ()

This method is deprecated.
This proprety is not used and it will be removed in future versions.

Returns whether the shortcut it comes from a default on the default page

Returns
  • true if the shortcut it comes from a default on the default page

public String getActiveFeatureId ()

Get the active featureId property value of the Shortcut instance. This feature is used to decide if we need to do any action on clicking on the short cut item in the menu.

Returns
  • the String value of the active featureId property.

public WebAttributeList getAttributeList ()

Get the attribute list for the instance

Returns
  • attribute list for this style

public String getBaseBean ()

Returns the name of the bean associated with the shortcut object. This bean is used in tasks such as resolving features. Notice that if this attribute is not set, the application tries to use the base-bean attribute for the element.

public String getBaseBone ()

Returns the name of a JavaScript bone with which the shortcut is associated. If defined, this bone is used to find the DHTML methods defined in other attributes of the shortcut element.

public Object getBuilder ()

Returns an instance of the class specified by the "builder-class-name" attribute. This object can be used to populate those classes that uses this Shortcut as their definition.

public String getBuilderClassName ()

When used as part of context-menus, returns the fully qualified name of the class used to populate context-menus that uses this Shortcut as definition

public String getCheckFeatureId ()

Get the check featureId property value of the Shortcut instance. This feature is used to decide if we need to show a check mark next to the short cut in the menu.

public String getDescriptor ()

Returns a descriptor that the application should use to display the shortcut if the desc-id attribute is missing.

public String getDescriptorID ()

Returns the Resource Bundle item id that the application should use to display the shortcut in the language of the user's locale.

public String getDhtmlChecked ()

Returns a javascript code that is evaluated to determine whether the shortcut should appear checked or unchecked when it is displayed. (This evaluation takes place at the browser and overrides the results of the evaluation that takes place at the server when the HTML is created - specified by the check-feature-id property.)

public String getDhtmlEnabled ()

Represents a javascript code that is evaluated to determine whether the shortcut should appear enabled or disabled when it is displayed. (This evaluation takes place at the browser and overrides the results of the evaluation that takes place at the server when the HTML is created - specified by the enable-feature-id property.)

public String getDhtmlShow ()

Represents a javascript code that is evaluated to determine whether the shortcut should be displayed. (This evaluation takes place at the browser and overrides the results of the evaluation that takes place at the server when the HTML is created - specified by the feature-id attribute. However, if the feature-id evaluation returns false, this evaluation never takes place.)

public boolean getDynamicAllSubMenu ()

public String getDynamicSubMenu ()

Returns
  • the value of the dhtml-show property

public String getEnableFeatureId ()

Get the enable featureId property value of the Shortcut instance. This feature is used to decide if we need to enable or disable the short cut in the menu.

public HashList getEvents ()

This method is deprecated.
Use getShortcutEvents()

Get the list of events

Returns
  • events list associated with this shortcut

public HashList getEvents (boolean isChecked)

Returns the HashList of ShortcutEvents associated with the shortcut

Parameters
isChecked specifies if the event requested is the event associated witht the checled or unchecked shortcut
Returns
  • the HashList of ShortCutEvents associated with the shortcut

public WebBeanPropertyList getExtendedPropertiesList ()

Get the attribute list for the instance

Returns
  • attribute list for this style

public String getExtraUrl ()

Returns a URL segment that is appended to the links URL.

public String getFeatureId ()

Represents a feature that is evaluated at the server to determine whether the object should be displayed.

See Also

public String getFeatureTarget ()

Returns the name of a feature that is evaluated to determine whether the target of this shortcut should be used. If the target is specified but the corresponding feature returns false, then the target is not used and the shortcut will open in the same browser window.

public String getHREF ()

Indicates the HTTP location to which the browser is directed when the shortcut link is clicked.

public String getImgHeight ()

If the shortcut is represented as an image, this property indicates the height of the image.

public String getImgSrc ()

If the shortcut is represented as an image, the ImgSrc indicates the source path of the image.

public String getImgWidth ()

If the shortcut is represented as an image, this property indicates the width of the image.

public String getKeyShortcutDesc ()

Returns a descriptor that the application should use to display the accelerator key (keyboard shortcut) if the key-shortcut-desc-id attribute is missing.

public String getKeyShortcutDescID ()

Returns the Resource Bundle item id that the application should use to display the accelerator key (keyboard shortcut) in the language of the user's locale.

public String getKeyShortcutString (Messages messages)

Returns the object's localized Shortcut descriptor.

Parameters
messages the messages l10n object.
Returns
  • the String representing the object's localized descriptor.

public int getLocation ()

When rendering multi-column system pickers, the location property indicates whether this shortcut is rendered before or after the rest of the shortcuts, outside the columns block. For example, when possible colors are displayed in a grid with rows and columns of color choices, you can use the location attribute to specify that the shortcut should be displayed either above (LOCATION_PREFIX) or below (LOCATION_SUFFIX) this grid.

Returns
  • the String value of the location property.

public String getName ()

Returns the name, a unique identifier for this shortcut.

public String getOnclick ()

Represents the javascript code that is evaluated when the shortcut link is clicked.

public String getScope ()

public String getShortCutClassName ()

When used inside a toolbar definition, returns the fully qualified name of the class to use when building toolbar items using the shortcut definition. This class will be used instead of those mapped to the getType() attribute.

public AbstractConfigurationElement.FilteredList getShortcutEvents ()

Get the list of events

public String getString (Messages messages)

Returns the object's localized descriptor.

Parameters
messages the messages l10n object.
Returns
  • the String representing the object's localized descriptor.

public ShortcutList getSubitemList ()

Get a single list of sub-items for this Shortcut. A sub-item can be specified as an implicit list of <shortcut&gr; nodes, or it can be specified as a list inside a <shortcuts&gr; node. This method will return a merge list of both of them.

Returns
  • submenu list associated with this menu item

public ShortcutList getSubtemList ()

This method is deprecated.
Use getSubitemList()

Get the list of submenu items inside this instance

Returns
  • submenu list associated with this menu item

public String getTarget ()

Returns the value of the target property as saved in the configuration file. The target represents the name of the window to which the request is directed when the shortcut link is clicked. The value itself might be a keyword like "mstrExportWindow" which is resolved at runtime based on preferences.

public String getTarget (WebComponent root)

This method is deprecated.
use resolveTarget(WebComponent root) instead

Returns the runtime value for the target of this Shortcut. For naming consistency this method has been deprecated, instead you should call resolveTarget(WebComponent)

public String getTargetUrl (WebComponent root, boolean useCheckedEvent, WebFeatures featureManager)

Returns the url associated with the shortcut

Parameters
root Webcomponent where to start looking for the bean associated with the event
useCheckedEvent boolean tells if we need to use the events corresponding to the checked state of the short cut or the unchecked state of the shortcut
featureManager a instance of WebFeatures to process user feature availability
Returns
  • the url associated with the shortcut

public String getTargetUrl (WebComponent root, boolean useCheckedEvent, boolean includeState, WebFeatures featureManager)

Returns the url associated with the shortcut

Parameters
root Webcomponent where to start looking for the bean associated with the event
useCheckedEvent boolean tells if we need to use the events corresponding to the checked state of the short cut or the unchecked state of the shortcut
includeState idicates if the url returned will contain the state of the WebComponents in the hierarchy or not.
featureManager a instance of WebFeatures to process user feature availability
Returns
  • the url associated with the shortcut

public String getTargetUrlParameters (WebComponent root, boolean useCheckedEvent, boolean includeState, WebFeatures featureManager)

Returns the url associated with the shortcut without including the servlet information.

Parameters
root Webcomponent where to start looking for the bean associated with the event
useCheckedEvent boolean tells if we need to use the events corresponding to the checked state of the short cut or the unchecked state of the shortcut
includeState idicates if the url returned will contain the state of the WebComponents in the hierarchy or not.
featureManager a instance of WebFeatures to process user feature availability
Returns
  • the url associated with the shortcut

public String getTooltipDescriptorID ()

Returns the Resource Bundle item id that the application should use to display textCobmo tooltip on the shortcut

public int getType ()

When used inside a toolbar definition, specifies the type of tool the shortcut represents:

  • TYPE_BUTTON : an image-only button.
  • TYPE_LABEL : an no-image label button.
  • TYPE_BUTTON_LABEL : an image button with label.
  • TYPE_COMBO: an image with a dropdown list
  • TYPE_TEXTCOMBO: a dropdown list with a text description.
  • TYPE_CAPTION: a non-clickable text.
  • TYPE_PULLDOWN: a pulldown list with a text area available for indicating the current element selected.
  • TYPE_CHECKBOX: a checkbox input
  • TYPE_TEXTBOX: a textbox input
  • TYPE_RADIO: a radio button input
  • TYPE_COLORPICKER: a color-picker
  • TYPE_BEAN: a tool whose content is generated by transforming a bean. The style from the StyleCatalog to use is defined by specifying an with name 'style-name'.

public boolean hasSubItems ()

Returns true if the shortcut has shorcuts associated with it

Returns
  • whether the shortcut has shorcuts associated with it

public boolean isIframe ()

When true, the shortcut link uses the application's asynchronous page update infrastructure through iframe to submit the users request to the Web server.

public boolean isSelected ()

Indicates that the shortcut is rendered as the selected item among the other links in the shortcut list.

public boolean isShortcutActive (WebFeatures featureManager, WebComponent root)

Returns true if the shortcut is active

Parameters
featureManager the feature authority responsible for verifying if the user has access to the feature associated with the shortcut
root WebComponent to use as the dependency object by the feature authority
Returns
  • whether the shortcut is active

public boolean isShortcutAvailable (WebFeatures featureManager, WebComponent root)

Returns true if the shortcut is available to the user

Parameters
featureManager the feature authority responsible for verifying if the user has access to the feature associated with the shortcut
root WebComponent to use as the dependency object by the feature authority
Returns
  • whether the shortcut is available to the user

public boolean isShortcutChecked (WebFeatures featureManager, WebComponent root)

Returns true if the shortcut will appear to the user as selected

Parameters
featureManager the feature authority responsible for verifying if the user has access to the feature associated with the shortcut
root WebComponent to use as the dependency object by the feature authority
Returns
  • whether the shortcut will appear to the user as selected

public boolean isShortcutEnabled (WebFeatures featureManager, WebComponent root)

Returns true if the shortcut is enabled

Parameters
featureManager the feature authority responsible for verifying if the user has access to the feature associated with the shortcut
root WebComponent to use as the dependency object by the feature authority
Returns
  • whether the shortcut is enabled

public boolean isShortcutTargetAvailable (WebFeatures featureManager, WebComponent root)

Returns true if the shortcut's target is available to the user

Parameters
featureManager the feature authority responsible for verifying if the user has access to the feature associated with the shortcut
root WebComponent to use as the dependency object by the feature authority
Returns
  • whether the shortcut's target is available to the user

public void removeShortcutList (Object key)

public void removeSubItem (Object key)

Remove the shortcut with the given key if it exists as a child for this shortcut. If a shortcut with the given key exists in the list (explicit list), it is deleted. Otherwise, the implicit list is searched for the shortcut.

Parameters
key The key for the shortcut node to be deleted

public String resolveTarget (WebComponent root)

Returns the runtime value of the target property. Tests for special (keyword) values of target and determine end value of this property. If not a keyword, it will return the value as specified for the shortcut.

Parameters
root WebComponent instance where to test features if required

public void setActiveFeatureId (String active_featureId)

Set the active featureId property value of the Shortcut instance.This feature is used to decide if we need to do any action on clicking on the short cut item in the menu.

Parameters
active_featureId the String value of the active featureId property.

public void setAppendState (boolean newValue)

Sets whether the shortcut needs to append the page state. The page state includes the state of all beans in the page so they can be restored in the server.

public void setBaseBean (String value)

Indicates the bean from the pages bean hierarchy associated with the shortcut object. This bean is used in tasks such as resolving features.

See Also

public void setBaseBone (String value)

Defines the name of a JavaScript bone with which the shortcut is associated. If present, this bone is used to find the DHTML methods defined in other attributes of the shortcut element.

public void setBuilderClassName (String value)

When used as part of context-menus, sets the fully qualified name of the class used to populate context-menus that uses this Shortcut as definition

Parameters
value fully qualified class name

public void setCheckFeatureId (String check_featureId)

Set the check featureId property value of the Shortcut instance.This feature is used to decide if we need to show a check mark next to the short cut in the menu.

public void setDescriptor (String descriptor)

Provides a descriptor that the application should use to display the shortcut if the desc-id attribute is missing.

public void setDescriptorID (String descriptorID)

Provides the Resource Bundle item id that the application should use to display the shortcut in the language of the user's locale.

public void setDhtmlChecked (String value)

Sets a javascript code that is evaluated to determine whether the shortcut should appear checked or unchecked when it is displayed.

public void setDhtmlEnabled (String value)

Sets the javascript code that is evaluated to determine whether the shortcut should appear enabled or disabled when it is displayed.

public void setDhtmlShow (String value)

/** Sets the javascript code that is evaluated to determine whether the shortcut should be displayed.

See Also

public void setDynamicAllSubMenu (boolean value)

public void setDynamicSubMenu (String value)

Parameters
value String with the value of the dyn-menu property

public void setEnableFeatureId (String enable_featureId)

Set the enable featureId property value of the Shortcut instance.This feature is used to decide if we need to enable or disable the short cut in the menu.

public void setExtraUrl (String newValue)

Defines a URL segment that is appended to the links URL.

public void setFeatureId (String featureId)

Sets the name of a feature that is evaluated at the server to determine whether the object should be displayed.

See Also

public void setFeatureTarget (String featureTarget)

Sets the name of a feature that is evaluated to determine whether the target of this shortcut should be used. If the target is specified but the corresponding feature returns false, then the target is not used and the shortcut will open in the same browser window.

public void setFromDefault (boolean newValue)

This method is deprecated.
This proprety is not used and it will be removed in future versions.

Indicates the shortcut it comes from a default on the default page

Parameters
newValue boolean value

public void setHREF (String href)

Indicates the HTTP location to which the browser is directed when the shortcut link is clicked.

Parameters
href A URL to use, for example: http://www.microstrategy.com

public void setImgHeight (String imgHeight)

If the shortcut is represented as an image, this property indicates the height of the image.

public void setImgSrc (String imgSrc)

If the shortcut is represented as an image, this property indicates the source path of the image.

public void setImgWidth (String imgWidth)

If the shortcut is represented as an image, this property indicates the width of the image.

public void setIsIframe (boolean iframe)

When set to true, the shortcut link uses the application's asynchronous page update infrastructure through iframe to submit the users request to the Web server.

Parameters
iframe the boolean value of the iframe property

public void setIsSelected (boolean newValue)

Indicates whetther the shortcut is rendered as the selected item among the other links in the shortcut list.

public void setKeyShortcutDesc (String value)

Provides a descriptor that the application should use to display the accelerator key (keyboard shortcut) if the key-shortcut-desc-id attribute is missing.

public void setKeyShortcutDescID (String value)

Provides the Resource Bundle item id that the application should use to display the accelerator key (keyboard shortcut) in the language of the user's locale.

public void setLocation (int location)

Set the location property value of the Shortcut instance. When rendering multi-column system pickers, the location property indicates whether this shortcut is rendered before or after the rest of the shortcuts, outside the columns block.

See Also

public void setName (String name)

Sets the name, a unique identifier for this shortcut.

public void setOnclick (String value)

Sets some javascript code that is evaluated when the shortcut link is clicked.

Parameters
value Some javascript code to execute, for example: "alert('here');return false;"

public void setScope (String value)

public void setShortCutClassName (String value)

When used inside a toolbar definition, specifies the fully qualified name of the class to use to render the tool.

Parameters
value A fully-qualified class name (e.g. com.microstrategy.web.app.gui.ShortcutElement)

public void setShortcutList (ShortcutList shortcutList)

public void setTarget (String target)

Set the target property value of the Shortcut instance. The target represents the name of the browser's window to which the request is directed when the shortcut link is clicked. The value itself might be a keyword like "mstrExportWindow" which is resolved at runtime based on preferences.

public void setTooltipDescriptorID (String ttDescriptorID)

Provides the Resource Bundle item id that the application should use to display textCobmo tooltip on the shortcut

public void setType (int type)

Set the type property value of the Shortcut instance. When used inside a toolbar definition, specifies the type of tool the shortcut represents

See Also

public void setUseWindowOpen (boolean value)

If set to true and the target attribute is set to a value, the application uses window.open to open the target window specified by the target attribute. (This is useful for providing to the new window with a reference to the parent window)

public boolean useWindowOpen ()

If true and the target attribute is set to a value, the application uses window.open to open the target window specified by the target attribute. (This is useful for providing to the new window with a reference to the parent window)

Protected Methods

protected String getKeyAttribute ()

This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.

protected ParameterBuilder newURIBuilder (WebComponent webComponent)

Convenience method to retrieve a new instance of a URI Builder from the connected Container Services object. If anything fails along the way, returns null.

Parameters
webComponent WebComponent to use to retrieve the beanContext.
Returns
  • The ParameterBuilder instance to use for building URIs.