Data Format of External Client-Side Triggers and Operations

You can use your preferred JavaScript editor to maintain your JavaScript implementation externally, for example in an external DSP layout or JavaScript files. This enables you to take advantage of JavaScript validation and debugging functionality that is not provided by Uniface. To do so, you need to implement client-side triggers and operations as JavaScript functions and add them as members of a JavaScript object tree.

The object tree has the following structure (expressed in JavaScript notation):

{
  ComponentName : {
    OperationName : function() { .... } ,
    OperationName2 : function() { .... },
    FieldName : {
       TriggerName : function() { .... },
       TriggerName2 : function() { .... }
    }
  },
  ComponentName2 : { .... }
}
  • ComponentName—the component name, in UPPERCASE.
  • OperationName—the operation name, in lowercase.
  • FieldName—the fully-qualified field name (FIELD.ENTITY.MODEL), in UPPERCASE.
  • TriggerName—the full trigger name, in lowercase.

Note:  JavaScript is case-sensitive, so all identifiers for objects, such as fields and components, MUST be in UPPERCASE, and all identifiers for modules (operations, triggers) MUST be in lowercase.

It is your responsiblity to ensure that the your JavaScript implementations are correctly deployed and that the browser loads them.

Related Topics