ScreenInputCallback (Web property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{Template:Web:ScreenOutputCallback subtitle}} The WebScreenInputCallback property is the property that contains the method that is called after a 3270 screen is received from...")
 
No edit summary
 
Line 1: Line 1:
{{Template:Web:ScreenOutputCallback subtitle}}
{{Template:Web:ScreenInputCallback subtitle}}
The WebScreenInputCallback property is the property that contains the method that is called after a 3270 screen is received from a client via [[Janus Web Legacy Support]] and before the HTTP response is converted into a Read Screen response.
The WebScreenInputCallback property is the property that contains the method that is called after a 3270 screen is received from a client via [[Janus Web Legacy Support]] and before the HTTP response is converted into a Read Screen response.
==Syntax==
==Syntax==

Latest revision as of 19:02, 17 June 2015

Screen input callback function (Web class)

[Introduced in Model 204 7.6]

The WebScreenInputCallback property is the property that contains the method that is called after a 3270 screen is received from a client via Janus Web Legacy Support and before the HTTP response is converted into a Read Screen response.

Syntax

%currentWebScreenCallback = %(Web):ScreenInputCallback %(Web):ScreenInputCallback = newWebScreenCallback

Syntax terms

%webScreenCallbackWebScreenCallback object
%(Web) The class name in parentheses denotes a shared method. ScreenInputCallback can also be invoked via a Web object variable, which may be Null.

Usage notes

  • The ScreenInputCallback function is called with no parameters. The function can examine incoming content by retrieving the data with the $Web_Input_Content function. Unlike ScreenOutputCallback, however, it cannot modify the incoming data. The incoming data can be either HTTP form-encoded data or MML (for Janus Web Legacy XML Support. The ScreenOutputCallback function can also examine request header parameters, including the URL.
  • If the ScreenInputCallback returns a False or a null, an exception will be thrown before the page is sent to the client.
  • The ScreenInputCallback can, of course, also throw an exception.
  • ScreenInputCallback has no effect on non-web threads and has virtually no overhead on non-web threads.
  • There can only be one ScreenInputCallback active in any request and a ScreenInputCallback is only active for the life of the request.

Examples

The following example checks for a URL parameter that indicates a web service request and throws an exception if it is found:

local function checker is boolean if $web_url_parm('webService') eq 'true' then return false end if return true end function %(web):screenInputCallback = checker ...

See also