Action Menu Model
Username:  
Password:
  > Home
> User Guide
> Reference
v Portal Object
    o Page Menu Model
    o Action Menu Model
    o Object Reference
> Development Guide


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> Portal Object >> Action Menu Model <=  =>      <  1  2  3  4  5  6  7  >  
Callbacks Menu that triggers actions

While the Portal Object provides all the common operations such as opening up a level and menu, you need to specify the the action to carry out when the item is clicked.  The actions are presented as JavaScript callback functions.  They include:

Callback Arguments and Description
LevelOn (level)
Called when a Level is opened
LevelOff (level)
Called when a Level is closed
MenuOn (topic, level, page, param, parent)
Called when a Menu is opened
MenuOff (topic, level, page, param, parent)
Called when a Menu is closed
ItemOn (topic, level, page, param, parent)
Called when an Item is opened
ItemOff (topic, level, page, param, parent)
Called when an Item is closed
ItemAction (topic, level, page, param, parent)
Called when an Item is clicked

When an item (i.e. topic) on the menu is clicked on, the doMenuItem client script (provided by the BEE Portal) will be called.  This script assumes the menu is opened in a hierarchical form so only the ancestors of the active item or the ancestors' siblings will be opened and therefore be clicked on.

So all it needs is to close all the submenus below the newly clicked item, before such item is opened.

This calling sequence will occur:

  1. Close the active item currently opened: ItemOff()
  2. Close the active menu: MenuOff()
  3. Close the level: LevelOff()
  4. Go up one level
  5. Close the active item at the level: ItemOff()
  6. Repeat from step 2 until completing the level of the newly clicked
  7. Open the newly clicked item to make it active: ItemOn()
  8. If the item is a menu, open the next level (LevelOn()) and open the menu at that level (MenuOn())
  9. Call ItemAction()

However, the assumption that only ancestors or their sublings will be clicked on may not be true if you allow inter-page linking.  In that case, another client script (also provided by the BEE Portal) doDirectItem will be called.  It basically called doMenuItem from the root menu item all the way down to the item wanted.

Previous Page       Next Page

Accsoft Computer Technology Pty Ltd     ABN: 98 065 617 549
PO Box 892, Epping NSW 1710         Level 1, Epping Office Park, 242 Beecroft Rd, Epping NSW 2121, Australia
Tel: Sydney - (02)98691668     National - 1300-881668         Fax: (02)98691866
© Copyright 2003 Accsoft Computer Technology Pty Ltd