web
Declares that the trigger or operation can be called from a web client, or that its data can be included in the DSP request-response exchange of other triggers or operations.
public web { | partner web }
Qualifiers
Qualifier | Description |
---|---|
public | The trigger or operation can be called by
a browser, RESTful web service, or similar web client. Operations that are public web can only have IN parameters. |
partner | For Dynamic Server Pages only. The trigger or operation can only be called by Uniface and not by the web client. However, data specified in the scope declaration can be included in the DSP request-response exchange of other triggers or operations. |
Use
public web can be used Dynamic and Static Server Pages, and in Services.
partner web can be used only in Dynamic Server Pages.
Description
You can use the public web and partner web commands to control access to specific triggers and operations from web clients. For example, if a web client attempts to activate an operation or trigger that does not contain the public web declaration, a yellow error page is displayed with the message Security error.
The public web declaration is always required in a ProcScript module that will be called from a web client. It must precede the scope declaration in operations, and in field-level triggers that are valid for the assigned widget. For valid triggers, see the specific widget description.
Using public web in a Static Server Page
If you have a Static Server Page (USP) that contains operations that are used only for internal purposes, use the public web in the exec operation to load the page in response to a web client request, but omit it from other operations.
operation exec public web webget if ($procError == 0) webgen endif end
Using public web and public soap in a Dynamic Server Page
In DSPs, it is possible to use both public web and public soap in the same ProcScript module. For example
operation doSomething public soap public web scope input output endscope < ... do something ...> end
Version |
Change |
---|---|
9.4.01 |
Introduced for DSPs |
10.2.02 F202 |
Supported in USPs and Services |