WinStudio

Edit Message to Web Container Dialog Box

Use this dialog box to format a message to be sent to another Web application. The Web application can be either Infor SharePoint Workspace or another WinStudio frame.

Message Type Specify a message type:
  • sendMessageToContainer - The message is sent to the child WinStudio frame. The JSON message (which does not actually have to be JSON in this case) is passed to the child frame without parsing and is handled by the StdWebContainerMessageReceived event handler in the child frame's form.
  • openForm - The message tells the child frame to open a new form after closing any form currently open in the frame. The JSON message sends a "parameter" that contains the same parameters that are used when you launch a form through a URL. See the example below. After the form is opened, you can use a "sendMessageToContainer" request to manipulate the form.
  • refreshForm - This allows a currently opened form to be refreshed with a new filter.
  • registerMessageHandler - This message type allows a user to register and monitor for messages that are sent through the Workspaces proxy. If using this message type, the JSON Message field takes a comma delimited list of messages you want to monitor for. When you monitor for a message, typically you would then use the StdWebContainerMessageReceived event handler and check the StdWebPageMessageContext form variable for that message type and StdWebPageMessageData for the data.
  • (other) - If you specify a message type that is not known to the WinStudio application, it is by default sent to Infor SharePoint Workspace. The JSON message format is also defined by Infor SharePoint Workspace. Each property must be surrounded by quotation marks.
JSON Message The message format is defined by the message type, as described above.

Examples

Launch a form in the child frame

This example uses the openForm message type to open the Item Stockroom Locations form in the child frame, with the filter based on the current form's Item property, and refreshes the form with that filter. The JSON message specifies these parameters:

{
  "parameters": "ItemStockroomLocations(FILTER(Item=FP(Item))
              SETVARVALUES(InitialCommand=Refresh))"
}

Refresh a filter

This example uses the refreshForm message type to refresh the filter in the child frame from the previous example.

The JSON message specifies these parameters:
{
  "filter": "Item=FP(Item)",
              "form":"ItemStockroomLocations"
}

Send a message to Infor SharePoint Workspace

This example sends a currency value, along with the base and target currency, from WinStudio to the Infor SharePoint Workspace currency converter.

In this example, the Message Type is set to currencyExchange, which is not a message type known to WinStudio. It is a message type supported by Infor SharePoint Workspace. The JSON message format is also defined by Infor SharePoint Workspace:

{
  "baseCurrency": "USD",
        "baseValue": "V(currencyValue)",
        "targetCurrency": "JPY"
}

Related Topics

About Generating Events from Components

Create, Copy, Edit or Delete Event Handlers

Event Handler Response Types (WinStudio)

Maximum Length of Parameters and Values

Understanding Custom Events

Understanding Event Handlers

Understanding Standard Events

Understanding the WinStudio Event Model