http://www.udev.info
Mail/Login: Password : forgot my password!
[UPDATE MODE]
Back

Output channels and triggers of Uniface server pages

Direct link http://www.udev.info/uniface/output-channels-and-triggers-of-uniface-server-pages
Written by -GHAN- // Tags: usp dsp output trigger

Both server page components have the same goal: bringing the content to the web. But they work in a different way as they serve different clients and requests.

The standard Uniface Server Page (USP)

The normal serverpage works like this:

in a normal activate of the component:
- GetState Trigger
- Execute Trigger
- SetState Trigger

The path is slightly changed as we call an operation.
on activation of an operation:
- GetState Trigger
- Operation
- SetState Trigger

Everything comes IN by $webinfo("input") and is delivered OUT to the web by $webinfo("output").

The Dynamic Server Page (DSP)

Which triggers are fired is not really clear to me at this moment. I will investigate that by time. But surely the GetState and SetState are fired. The GetState handles the type of request ("Get state" part) aswell as the reconnect ("parse request" part) to the entities while the SetState will deal with the State afterwards.

Full / initial page (execute trigger) does this:
- weblayout (fills OUTPUT)
- webdefinitions (fills DEFINITIONS, JAVASCRIPT, CSS)
- websave (fills DATA)

All three are combined and sent to the browser.

The output channels has been told to be as follows:
$webinfo(OUTPUT): contains HTML (only!). Used in 'full page' requests (i.e. intial page/execute triger, other triggers that have property 'full page'.) NOT used in AJAX requests!
$webinfo(DATA): contains field data and properties (as JSON). Used in both 'full page' and AJAX requests. For AJAX, sent directly to the browser. For full page, combined with $webinfo("OUTPUT")
$webinfo(DEFINITIONS): contains field/entity meta-data (such as widget type, declarative properties) as JSON. Since this is static information, only used in 'full page' requests, NOT in AJAX requests
$webinfo(JAVASCRIPT): contains javascript includes necessary for the widgets on a page. Since this is static information, only used in 'full page' requests, NOT in AJAX requests
$webinfo(CSS): contains CSS includes necessary for the widgets on a page. Since this is static information, only used in 'full page' requests, NOT in AJAX requests

If something is missing here, please let me know so I can update this.

Comments

on 2010-10-20 20:39:52 RichardGill wrote:

You can add (putitem) actions in $webinfo(DATA) to be trapped by javascript in udatalayer.js. We used that to evaluate javascript code from triggers (this needs a modified udatalayer.js to handle specific requests, as I didnt find a clean way to use Uniface stuff)

738 view(s) / 2010-03-01 13:27:37 / LAST UPDATED: 2010-09-29 11:34:58