AjaxCommand

Top  Previous  Next

AjaxCommand_icon

AjaxCommand element is similar to "mor > zpro > ExecuteCommand" with the exception that the request is sent with XMLHttpRequest instead of a regular HTTP Request and the process list of an AjaxCommand element contains Refresh Process Elements.

This element must be placed into a process form and it is used to define the processes to be executed when the command is given by the user.

AjaxCommand

Properties

Process List

To open the Process List dialog, click on the [...] button on the right side of the property. The process list should contain at least one Refresh Process Element.

 

Access Control (Accepts MScript)

The processes in the process list are executed only if the current user has sufficient property. If no definition is made in this property then the "Access Control" property of the page is used. For more information please see "Base Elements > Elements "Page" > Property "Access Control""  topic.

 

Process Manager Debug Level (Accepts MScript)

To trace the steps of the Process Manager on the system console give a value to this property between 1 (less details) and 3 (more details). The debugging settings of processes are defined in the Process List dialog.

 

Before-Submit Function

In this property you can define a Javascript function that supposed to be called just before the submitting the Process Form. The function receives the ProcessForm object as the parameter and can perform last minute tasks such as validation the input and it can cancel the submission returning false as the result.

 

Validate Input

Select "true" if you want that the input fields are validated before submitting the request. The validation is performed only for the fields that are located in the ProcessBlock where the selected Process Definition elements exist.

 

Confirmation Request Message

For some cases it is necessary to ask the user for confirmation before submitting the process form; for instance, before deleting a record. If a value is given into this property, it will be displayed to the user in the confirmation request dialog and the process form will be submitted only if the user confirms.

 

Request Parameters

The parameters and their values. The initial value "{p1:'p1val', p2:'p2val'} ?" aims to show the definition syntax and if no update is made to it, it is ignored in the output.

 

Busy Image (busyImage)

The HTML id of a BusyImage element that exists in the page.

 

CallBack Function (callbackFunc)

The Javascript function to be called after the response received and the defined refresh handlers executed. The function receives a MultiPartAjaxResponse object as the parameter

 

User Data (userData)

The user data object defined with this property is passed to the response handler and the callback function.

 

Error Handler (errorHandler)

The name of the function to be called when an error occurs. The function receives Exception and AjaxResponse objects as the parameters.