Since many wrappers provide the capability to communicate messages back and forth between other instances, OWS provides the ability to listen for these messages and react to them through a defined set of actions. To begin listening for a message, provide the Type of the message to listen for, and optionally the specific Value of the message. If you are using Toolbar and ListX together, this concept is truly simple and provides immediate usability of your interface.
• Type - The Type of the message to listen for. Required to limit the messages to which this control will respond.
• Value - The Value of the message. If not provided, the Event will process when ANY message of the defined type is received.
Two possible examples are provided by this scenario:
a) Standard Toolbar types of events, where the Type and Value are both provided. This is common when dealing with interfaces with events that require no true parameter other than the name of the command. For instance, you may have a list of commands like “Save”, “Cancel”, “Clear” on an edit screen. Each of these would be configured under the same Type, something like:
Type: myToolbar1 Value: Save
Type: myToolbar1 Value: Cancel
Type: myToolbar1 Value: Clear
In this scenario, pressing he Save button would alert the message that myToolbar1 raised a message with a value of “Save”.
b) Record events, where the Type is a specific event type, and the Value is an identifier of the record for which you want to handle the action. For example, you may have a list of records, and on each one, you may have defined an Action tag which raises a Message to the ListX module. This message may be something like:
Type: Delete Value: \[ProductID\]
In this scenario, you would specify the Type of the message as “Delete” and leave the Value blank, so all messages with the type “Delete” would trigger the event. Within your action script, the very next step may be to perform a query. In that case you would fetch the actual value like this:
Delete from Products where ProductID = ‘\[Delete,Message\]'