Setting up the receiving form

The receiving form must be "listening for" messages from the sending form. The receiving form does this by registering for the custom message type specified in the sending form.

To set up the receiving form:

  1. Select a component on the form and then click the Events tab on the property sheet.
  2. Create a form event handler, typically for the StdFormInitCompleted event.
  3. Click the ellipsis (...) button for the Primary event field.
  4. In the Event Handlers dialog box, click New.
  5. In the Event Handler Properties dialog box, specify the name of the event in the Event field.
    Remarque:  Assuming you are using a StdFormInitCompleted event, that event name should already be populating the Event field.
  6. For the Response > Type, select Send Web Container Messsage.
  7. Click the ellipsis button for the Parameters field.
  8. In the Event Handler Parms (Parameters) dialog box, click Type Specific Parameters.
  9. In the Edit Message To Web Container dialog box, from the Message Type drop-down list, select registerMessageHandler.
  10. In the JSON Message field, specify the name of the custom message type that you created in Step 9 of the previous section.

    This step allows the receiving form to monitor for StdWebContainerMessageReceived events being generated by the sending form.

Rubriques liées