User Level
Business Administrator with Menu administrative access
User LevelBusiness Administrator with Menu administrative access SyntaxAdd CommandTo define a command from within MQL use the Add Command command. Syntax
Label ClauseThis clause specifies the label to appear in the menu in which the command is assigned. For example, many desktop applications have a File menu with options labeled “Open” and “Save.” Href ClauseThis clause is used to provide link data to the
The syntax is:
Assigning an href to a link can create problems if a user clicks the same link twice when initiating such actions as changing an object’s state or submitting a form. The reason for this is that an href assigned to a link is considered a server request, even if it is a JavaScript command. Whenever the browser detects a server request, the browser stops processing the current request and sends the new request. Therefore, when a user first clicks on an href link, the request is processed, and typically, a JSP page starts executing. If, during this time, a user clicks the same link again, the first request is interrupted before completion and the new request is processed instead.
To avoid this scenario, you can set the href to “#” and use the
<a href="#" onclick="submitForm()"> Alt ClauseThis clause is used to define text that is displayed until any image associated with the command is displayed and also as “mouse over text.” The syntax is:
Code ClauseThis clause is used to add JavaScript code to the command. The syntax is:
When commands are accessed from a JSP page, the href link is evaluated to bring up the next page. Commands only require code if the href link references JavaScript that is not provided on the JSP. The JSP must provide logic to extract the code from this field in order for it to be used. None of the commands provided by the applications or Framework use the code field. You can add the code in the Code clause or it can be written in an external editor. If you use an external editor, use the File clause instead. File ClauseThis clause is used to specify the file that contains the code for the command when the code is written in an external editor. The syntax is:
User ClauseThis clause is used to define the users allowed to see the command. Any number of roles, groups, persons, and associations can be added to the command (role-based in this case includes all types of users and is not limited to only roles). The syntax is:
Or:
Setting ClauseThis clauseprovides any name/value pairs that the menu needs. They can be used by JSP code, but not by hrefs on the Link tab. The syntax is:
For example, an image setting with the image name can be specified to display when the menu is used in a toolbar:
History Clause
The
Copy CommandAfter a command is defined, you can clone/copy the definition. Cloning a Command definition requires Business Administrator privileges, except that you can copy a Command definition to your own context from a group, role or association in which you are defined. This command lets you duplicate defining clauses with the option to change the value of clause arguments:
History Clause
The
Modify CommandUse the Modify Command command to add or remove defining clauses and change the value of clause arguments.
Each modification clause is related to the arguments that define the command. To change the value of one of the defining clauses or add a new one, use the Modify clause that corresponds to the desired change. When modifying a command, you can make the changes from a script or while working interactively with MQL.
Delete CommandIf a command is no longer required, you can delete it using the Delete Command.
For example, to delete the command named “Convert,” enter the following:
After this command is processed, the command is deleted and you receive an MQL prompt for another command. |