Running O4W forms, reports, procedures and dashboards within an MDI frame using O4W_CHILD_FORM (Web)

O4W Child Form

The O4W_CHILD_FORM is designed to be invoked within an MDI frame.  Like the CTO_CHILD_FORM and AREV32_CHILD_FORM, it has parameters passed in to it during the form creation event.  These parameters are combined with the information found in the configuration record CFG_O4W (or CFG_O4W*<appid>*<username>, CFG_O4W**<username>, or CFG_O4W*<appid>, as appropriate) in order to determine what will be displayed.

The layout of the CFG_O4W form is:

* 1. Default URL (URL to use if no "create params" specified)

* 2. {Default width ] Default height} (optional size to use if no "create params" specified)

* 3. SiteName ]

* 4. URL for site ]

* {5. Title] }

* {6. ProgType] }

* {7. ProgDetail] }

* {8. Width\Height]}

Where field 1 is the full URL to open if the O4W_CHILD_FORM is executed without any other "create params" to specify where to initially navigate to, field 2 is an optional height and width (@vm delimited) to use when opening the child form when no "create params" are specified, field 3 is an @VM delimited list of names to use when referring to different O4W web sites, field 4 is an associated @VM delimited list of the URLs to those different web sites, and fields 5-8 are optional modifiers.  Field 5 contains the associated @VM delimited list of titles to use when connecting to the web site, field 6 contains the @VM delimited type of routine to run by default when connecting to the web site, field 7 contains the @VM delimited specific routine to run by default when connecting to the web site, and field 8 contains the @VM delimited optional height and width (@SVM separated) to use when opening the child form.

In its simplest form, then, the SYSENV CFG_O4W record might look like this:

ID: CFG_O4W

1.   http://www.mysitename.com/o4w/start.htm

2. 

3.   O4W

4.   http://www.mysitename.com/o4w/oecgi3.exe

This defines a single "site", named O4W, and specifies the url that is needed when building an O4W request to that site.  If no 'create params' are specified when the O4W child form is invoked, then the default URL in field 1 is used when opening the form.  A slightly more complex record, which supports 2 different O4W servers, might look like this:

 

ID: CFG_O4W

1.   http://www.mysitename.com/o4w/start.htm

2.

3.   O4W]EXAMPLES

4.   http://www.mysitename.com/o4w/oecgi3.exe]http:%%//%%www.mysitename.com/examples/oecgi3.exe

When the O4W_CHILD_FORM is invoked, its "creation parameter" defines exactly what site should be used, what type of routine should be invoked, what routine details are required, and optionally the title and size to use for the form; these parameters are "|" (pipe) delimited when passed in from the form designer, or may be @FM delimited when passed in via a stored procedure call.  The definition of the creation parameter is:

<sitename>|<routinetype>|<routinedetails>|{<title>}|{<width>}|{<height>}

Where <sitename> is the name of the site found in field 2 of the CFG_O4W record that this request should be routed to; <routinetype> is the type of routine ("FORM","REPORT","MENU","DASHBOARD") that you wish to invoke; <routinedetails> is the name of the form, report, menu, or dashboard to invoke; title is the optional title to display on the O4W_CHILD_FORM, and <width> and <height> are the optional height and width used to create the O4W_CHILD_FORM.

For example, using the CFG_O4W shown above, a valid "creation parameter" might be:

O4W|FORM|CUSTOMER_ENTRY|Customer Entry Form

This will open up the O4W_CHILD_FORM and set its title to "Customer Entry Form" and its url to:

 

"http://www.mysitename.com/o4w/oecgi3.exe/O4W_RUN_FORM?INQID=CUSTOMER_ENTRY"

 (The O4W_CHILD_FORM has been programmed so that it automatically generates the correct URL pieces based on the <routinetype> value).

If desired, it is also possible to embed the new browser control in other forms without the use of the O4W_CHILD_FORM.  To do so, directly reference the OLE control OIVBGECKO.UserControl1 in your form, and set the URL property (at a minimum).  You may also access the following properties:

HTML

StatusText

History (read only)

OIVBGecko supports the following methods:

Stop()

Save(string filename)

Reload()

Paste()

Back()

Forward()

Execute(string name)

bool Cut()

bool Copy()

bool CopyLink()

bool CopyImageLocation()

bool CopyImageSource()

OIVBGecko can also raise the GeckoEvent, GeckoNewWindow, and GeckoDownload events (which may be captured via the "OLE" qualified event in the OI form).  The GeckoEvent will return a single parameter, indicating the type and details of the event (separated by char(252)). The type will be one of the following strings:

Title (with the actual title returned in the 'details')

DocumentCompleted

Validated

Validating

Navigated

Navigating

Status (with the status text returned in the 'details')

WindowClosed

                                                

The GeckoNewWindow event will return with a single parameter, containing the URL and name of the new window (char(252)-delimited).  The GeckoDownload event will return with a single parameter, containing the suggested filename, the MIME type, a binary flag ("1" if the download is binary, or "0" otherwise), and the actual downloaded contents, all char(252) delimited.

  • kb/kb_articles/kb1003.txt
  • Last modified: 2024/01/30 13:36
  • by 127.0.0.1