DataRequest (PRIM_WEB.DataRequest)
Definition of a SRVROUTINE to be executed
Ancestors - Server Request (PRIM_WEB.ServerRequest)Object (PRIM_OBJT)
Details
A DataRequest defines an instance of a Server Module SrvRoutine so that it can be executed.
As all communication with the server is via a webserver, most requests should be executed asynchronously using the ExecuteAysnc method. Once submitted, processing will continue. The Completed and Failed events are used to respond to the completion of the routine.
Reasons
Enum Value | Description |
|---|---|
ServerError | An error occurred when executing the SrvRoutine. Check the joblog and x_err.log for further information |
SessionInvalid | There is no valid session available on the server. |
LicenseInvalid | The server license has expired |
Example
In this example, a request is submitted asynchronously. When completed, the returned data is added to a list on the screen.
Mthroutine Name(GetData)
Define_Com Class(#MyServerModule.GetData) Name(#GetData)
#GetData.ExecuteAsync(#DataList)
Evtroutine Handling(#GetData.Completed)
SelectList Named(#Datalist)
Add_entry To_list(#UIList)
Endselect
Endroutine
Endroutine
Properties
Name | Description |
|---|---|
ComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT) | |
ComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT) | |
ComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT) | |
Generic space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT) | |
ComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT) | |
ComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT) | |
Name identifies the component Inherited from Object (PRIM_OBJT) | |
Owner owns this component Inherited from Object (PRIM_OBJT) | |
The component instance to which this instance is attached. The visual container for a control or the collector of a set of child instances Inherited from Object (PRIM_OBJT) | |
Name of the routine to be executed Inherited from Server Request (PRIM_WEB.ServerRequest) | |
Name of the server module Inherited from Server Request (PRIM_WEB.ServerRequest) |
Events
Name | Description |
|---|---|
Fired when the Webroutine request completes successfully | |
CreateInstance is signaled when an instance of a component is created Inherited from Server Request (PRIM_WEB.ServerRequest) | |
DestroyInstance is signaled when an instance of a component is about to be destroyed Inherited from Server Request (PRIM_WEB.ServerRequest) | |
Fired while data is being downloaded from the server Loaded, Total, Progress | |
Fired when the Webroutine request fails Reason, Handled | |
Fired while data is being uploaded to the server Loaded, Total, Progress |