PUIATEXMNU - This program returns the valid Menu Items for a specified user and Menu Group (a.k.a. [ Menu Item ] Parent).
Build the Atrium Menu
D PUIATEXMNU PR ExtPgm('PUIATEXMNU') D iUser 128A Const D iType 1A Const N=NavMenu T=Toolbar H=homepages D iParent 128A Const D ioItem LikeDS(Item) D oError N D oErrorMsg 256A
This program returns the valid menu items for a given user and tree parent. If the parent is blank, the root level menu items will be returned.
The menu items Menu Items are returned by the
PUIATEXMNU exit program one at a time by one in the ioItem Item data structure.
D Item DS Qualified D Code 128A D Parent 128A blank = root D Type 1A 0=NONLEAF 1 = LEAF 0 = NONLEAF D ActionType 1A 20=richURL dsply1=Macro 02=urlRDFApp 3=PCCmd D Action 512A libLIB/pgmPGM or urlURL D Text 128A D Icon 128A D OpenInWindow 1A D OpenOnceOnly 1A D Parm 256A
Each menu item must have a unique code
The code of the parent menu item (blank if at the root level)
1=Leaf Node (will run a program), 0=NonLeaf Node (submenu)
2 = rich display file, 0 = regular URL
The Program to run (if a leaf node)
The text displayed in the menu
the path of the image icon for the menu item. If blank, the default icon is used
set to 1 if the program should open in a new window, else 0
set to 1 if the menu item can be opened once only, else 0
|Subfield||Subfield Values Explanation||Purpose|
|Used as a unique reference value for Menu Items and Menu Groups, must be unique.|
|If not at root level, value is Code for Menu Group the Menu Item is directly under. If the Parent value is |
|Specifies Node as being a Menu Item or Menu Group.|
|Determines how Action value is to be executed.|
|[ If Leaf Node, ] Execute Action value as ActionType.|
|Name of Menu Item.|
|Path of the image to be used as the menu icon for the Menu Item.|
|Determines whether the Action should be executed in a new Atrium Tab or in a New Browser Window or Tab.|
|Determines the number of times a Menu Item can be opened in Atrium Tabs.|
|Parameter to be added to the URL or passed to the Application.|
1 Requires PC Command Listener, Launcher or Applet.
2 Which one the browser opens the Action in can be affected by user's browser settings.
3 If Menu Item is being opened in a New Browser Window or Tab, this value will not be able to limit the number of instances.
Because there can be an unknown number of menu items Menu Items to return, when Atrium calls this exit program, just one menu item Menu Item (in the item Item data structure) is returned. Atrium repeatedly calls the program until there are no more menu items Menu Items to return, in which case
PUIATEXMNU returns the item Item data structure empty.
PUIATEXMNU runs in stateless environment and has no way to determine how many menu items it has returned or which one to send next. To resolve handle this, Atrium keeps track of this. Atrium will clear the item Item data structure before the first call to indicate that is wants the first menu item Menu Item of parent Item.Parent On . On subsequent calls Atrium does not alter the Item data structure previously returned (on the second call the , first menu item Menu Item is still in the Item data structure). This allows
PUIATEXMNU to determine which menu item Menu Item to return next. After the last menu item Menu Item has been returned, Atrium will call
PUIATEXMNU again, the item data structure will be returned cleared to indicate that there are no more menu items Menu Items.
Atrium Calls PUIATEXMNU
structure is cleared.
Returns the first
Menu Item in the item data
Item data structure contains the first
file pointer and returns the second
Item data structure contains the second
file pointer and returns the third
Item data structure
contains thenth Menu Item.
file pointer and returns
Menu Item n+1.
Item data structure contains second to last
file pointer and returns the last
Item data structure contains
last Menu Item.
pointer at EOF
, and returns cleared Item data structure