For example, the right-click menu for a document object could be configured to display the list of files checked into that object, and clicking on a file name opens the file. Dynamic commands require a JPO:method to generate the command structure. The JPO:method is specified using the Dynamic Command Program and Dynamic Command Function settings on the command object. The menu is generated when the right mouse click event is fired. The command in the right-click menu, when clicked, call the page specified by the href of the command, which could be a popup or processing page depending on the Target Location specified for the command. If these settings are configured on a menu, the returned items are listed as submenus/commands of that menu. If configured on a command, the returned items replace the current commands. If the JPO:method returns a large number of items, a second column is added to the popup menu. The menu expands according to the current browser size; if needed, a scroll bar is added. If your code contains complex logic or lengthy database calls, a Loading... message shows in the right-click menu until the data has been received and generated. The Business Process Services (AEF and APP prefixes) install these dynamic menu commands that can also be used in customized menus:
This command uses emxAEFUtil:getGenericDelete as the JPO:method (Dynamic Command Program and Dynamic Command Function settings).
This command uses emxAPPQuickFile:listQuickFiles as the JPO:method (Dynamic Command Program and Dynamic Command Function settings) to generate the list of files.
This command uses emxAPPQuickFile:listRelatedFiles as the JPO:method (Dynamic Command Program and Dynamic Command Function settings) to generate the list of files. In addition, the Pull Right=true setting is specified.
This command uses emxAPPQuickFile:listReferenceDocuments as the JPO:method (Dynamic Command Program and Dynamic Command Function settings) to generate the list of files. In addition, the Pull Right=true setting is specified.
This command uses emxAPPQuickFile:listFileVersion as the JPO:method (Dynamic Command Program and Dynamic Command Function settings) to generate the list of files, with the Access Expression=type.kindof=="$<type_DOCUMENTS>" setting.
This command uses emxAPPQuickFile:getQuickFileTable as the JPO:method (Dynamic Command Program and Dynamic Command Function settings) to open the Quick Files page for the object. This code shows an example method signature: public static List getRelatedFileItem(Context context, String[] args) throws FrameworkException The JPO:method is provided a single args[] array containing a packed Map with these inputs:
The JPO:method returns a list with each entry corresponding to a menu command. Each entry in the list is a map with this structure:
|