Creating a Web Output Filter Plug-in
Uniface provides a generic mechanism that enables you to add your own JavaScript or HTML to web pages generated from dynamic and static server pages.
-
Create a component that has an operation
called
filterOutput
, with an IN parameter for the server page instance name, and an INOUT parameter for the content to be injected into the server page.For example:
operation filterOutput params string pWebComponentInstanceName : In string pResponseStream : InOut endparams <Your code here> end ; operation filterOutput
You are entirely free to implement the component as you see fit.
-
Edit the application assignment file to add
the component name to the UWEBOUTPUTFILTERS logical.
For example:
[LOGICALS] UWEBOUTPUTFILTERS = myplugin
The components defined by this logical are activated by the Uniface USYSHTTP component in the order specified by the logical, after it has generated the response to the browser request.