WinStudio

Using Parent and Child Frames in the WinStudio Web Client

You can create a web page consisting of iframes:

The WSChild.aspx frame can display a WinStudio form, or it can be used as a SharePoint web part. We use the terms parent and child here to describe the relationship between the Mongoose-based applications. However, both iframes, in the HTML sense, are siblings (children of a common parent iframe).

Using a URL to Initialize the Child

WSChild.aspx waits to initialize itself until the parent form, which is loaded via standard URL, is logged into or is loaded with an existing session.

WSChild.aspx can be loaded standalone, or with parameters to load a form by default. For example, this URL loads the SyteLine Items form into the child frame with a filter, after the user logs into the SyteLine web client in the parent frame:

http://server/WSWebClient/WSChildForm.aspx?Form=Items(FILTER(Item='FA-10000')SETVARVALUES(InitialCommand=Refresh))

Adding the Child to SharePoint

To add a child Web form to a SharePoint application such as Infor SharePoint Workspace:

  1. Edit the application's site page.
  2. Select Add a Web part > Media and Content > Page Viewer.
  3. In the Page Viewer Web Part, select Web Page and enter the URL in the Link field.

Communicating with the Child

In the parent frame, use WinStudio event handlers with a response type of Send Web Container Message to send JSON messages that update the child frame. For example, the parent can tell the child to close the existing form and open a new one, filtered on certain data. Or the parent can refresh with a new filter a currently opened form in the child frame.

The child frame uses the StdWebContainerMessageReceived event to deal with the messages from the parent frame. Use the ThisForm.WebPageMessageData API to extract the content of the message received using this event.