IlvAbstractPopupMenu

IlvObject
  |
  +--IlvAbstractPopupMenu
Category:
Common component
JavaScript File:
IlvAbstractPopupMenu.js
Description:
This abstract class defines a popup menu intended to be set on a view. The contextual menu will be displayed this menu on a right click on the view
This contextual could be static or dynamic.
Subclasses must override the createRequestURL(view,event,modelId).

The compatible browsers are Internet Explorer 5.5+ and FireFox 1.0+


Constructor Summary
IlvAbstractPopupMenu(init)

Method Summary
createRequestURL(view, event, modelId)
Each subclass must implement this method.
Returns the request URL to query a dynamic popup menu (used by the factory).
displayPopupMenu(view, event, modelId)
Displays a pop-up menu in a thin client.
getItemDisabledStyleClass()
Returns the CSS class of a disabled menu item.
getItemHighlightedStyleClass()
Returns the CSS class of a highlighted menu item.
getItemStyleClass()
Returns the CSS class of a menu item.
getMenu()
Returns the static root menu displayed by this popup menu.
getSubMenuIcon()
Returns the image URL of the icon that shows the menu item is a submenu.
hidePopupMenu()
Hides the visible pop-up menu in a thin client, if there is one; otherwise, this method does nothing.
internalDisplayPopupMenu(x, y, menu)
Displays the specified popup menu at the specified coordinates.
This methods is directly called by the displayPopupMenu if the menu is static or by the factory.asyncDisplayPopupMenu if the menu is dynamic.
isDynamic()
Returns the mode of this popup menu.
If the menu is dynamic a request will be done to populate the popup
If the menu is static, the popup menu will display the menu set by the setMenu(menu) method.
isPopupTrigger(event)
Checks whether the given event is a pop-up menu trigger.
performServerAction(actionName, params, updateAll)
Performs a server action, using the action name and the parameters.
setDynamic(dynamic)
Sets the mode of this popup menu menu.
If the menu is dynamic a request will be done to populate the popup menu
If the menu is static, the popup menu will display the menu set by the setMenu(menu) method, if any.
setItemDisabledStyleClass(itemDisabledStyleClass)
Sets the CSS class of a disabled menu item.
setItemHighlightedStyleClass(itemHighlightedStyleClass)
Sets the CSS class of a highlighted menu item.
setItemStyleClass(itemStyleClass)
Sets the CSS class of a menu item.
setMenu(menu)
Sets the static root menu displayed by this popup menu.
If the parameter is not null, this popup menu instance becomes static: isDynamic returns false, otherwise the popup menu becomes dynamic.
setSubmenuIcon(subMenuIcon)

Sets the image URL of the icon that shows the menu item is a submenu.

Constructor Detail

IlvAbstractPopupMenu

IlvAbstractPopupMenu(init)
Creates an instance of IlvAbstractPopupMenu.

Method Detail

createRequestURL

createRequestURL(view, event, modelId)
Each subclass must implement this method.
Returns the request URL to query a dynamic popup menu (used by the factory).

displayPopupMenu

displayPopupMenu(view, event, modelId)
Displays a pop-up menu in a thin client.

This method returns immediately. It returns true if the event is not a pop-up menu trigger event; otherwise, it returns false. If the popup is dynamic the tasks are performed asynchronously:

Else if the popup is static the action is done synchronously.
Parameters:
view - The view with which the pop-up menu is associated.
event - The pop-up menu trigger event. An alert is shown if this event is not a pop-up menu trigger.

See also:
IlvPopupMenuFactory#create
#isPopupTrigger


getItemDisabledStyleClass

getItemDisabledStyleClass()
Returns the CSS class of a disabled menu item.
Returns:
The CSS class of a disabled menu item.

getItemHighlightedStyleClass

getItemHighlightedStyleClass()
Returns the CSS class of a highlighted menu item.
Returns:
The CSS class of a menu highlighted item.

getItemStyleClass

getItemStyleClass()
Returns the CSS class of a menu item.
Returns:
The CSS class of a menu item.

getMenu

getMenu()
Returns the static root menu displayed by this popup menu.
Returns:
The static root menu.

getSubMenuIcon

getSubMenuIcon()
Returns the image URL of the icon that shows the menu item is a submenu.
Returns:
The submenu icon.

hidePopupMenu

hidePopupMenu()
Hides the visible pop-up menu in a thin client, if there is one; otherwise, this method does nothing. Returns true if a pop-up menu was visible and has been hidden, otherwise it returns false.

See also:
#displayPopupMenu


internalDisplayPopupMenu

internalDisplayPopupMenu(x, y, menu)
Displays the specified popup menu at the specified coordinates.
This methods is directly called by the displayPopupMenu if the menu is static or by the factory.asyncDisplayPopupMenu if the menu is dynamic.

isDynamic

isDynamic()
Returns the mode of this popup menu.
If the menu is dynamic a request will be done to populate the popup
If the menu is static, the popup menu will display the menu set by the setMenu(menu) method.

isPopupTrigger

isPopupTrigger(event)
Checks whether the given event is a pop-up menu trigger.

performServerAction

performServerAction(actionName, params, updateAll)
Performs a server action, using the action name and the parameters. The parameters of the action are:
Parameters:
actionName - The server action name
params - The action parameters.
updateAll - If true, update the capabilities and the image otherwise update the image only.

setDynamic

setDynamic(dynamic)
Sets the mode of this popup menu menu.
If the menu is dynamic a request will be done to populate the popup menu
If the menu is static, the popup menu will display the menu set by the setMenu(menu) method, if any.

setItemDisabledStyleClass

setItemDisabledStyleClass(itemDisabledStyleClass)
Sets the CSS class of a disabled menu item.
Parameters:
itemDisabledStyleClass - The CSS class of a disabled menu item.

setItemHighlightedStyleClass

setItemHighlightedStyleClass(itemHighlightedStyleClass)
Sets the CSS class of a highlighted menu item.
Parameters:
itemHighlightedStyleClass - The CSS class of a highlighted menu item

setItemStyleClass

setItemStyleClass(itemStyleClass)
Sets the CSS class of a menu item.
Parameters:
itemStyleClass - The CSS class of a menu item.

setMenu

setMenu(menu)
Sets the static root menu displayed by this popup menu.
If the parameter is not null, this popup menu instance becomes static: isDynamic returns false, otherwise the popup menu becomes dynamic.
Parameters:
menu - The root menu.

setSubmenuIcon

setSubmenuIcon(subMenuIcon)

Sets the image URL of the icon that shows the menu item is a submenu.

If the parameter is null, a > character is used.

Parameters:
subMenuIcon - The submenu icon.

Inherited Methods from IlvObject
callDispose, dispose, getClassName, hashCode, inherits, instanceOf, invoke, registerDispose, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility