Using parent and child frames in the WinStudio web client

You can create a web page consisting of iframes:

  • A parent Windows client web application frame
  • A WSChild.aspx child frame

The WSChild.aspx frame can display a Windows client form, or it can be used as an Infor Ming.leTM context application. 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 an Items form into the child frame with a filter, after the user logs into the web client in the parent frame:
http://server/WSWebClient/WSChildForm.aspx?Form=Items(FILTER(Item='FA-10000')SETVARVALUES(InitialCommand=Refresh)) 

Communicating with the Child

In the parent frame, you must use Windows client 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. You must use the ThisForm.WebPageMessageData API to extract the content of the message received using this event.