Resource Request (PRIM_WEB.ResourceRequest)
Request to download a resource
Ancestors - Server Request (PRIM_WEB.ServerRequest)Object (PRIM_OBJT)
A ResourceRequest is the definition of a server routine used to download individual objects.
This example show the definition and execution of a download routine. Such routines are used to download a file for use on the target system e.g. Image, documents etc.
Mthroutine Name(Download)
Define_Com Class(#xDemoDataServices.DownloadImage) Name(#ImageDownLoad)
#ImageDownLoad.execute( #Empno )
Endroutine
The code below shows how the download routine might be coded.
Srvroutine Name(DownloadImage) Response(#Response)
Field_Map For(*Input) Field(#Empno)
Fetch Fields(#GiveName #Surname) From_File(pslmst) With_Key(#empno)
If_Status Is(*okay)
Fetch Fields(#empimg) From_File(pslimg) With_Key(#empno)
If_Status Is(*okay)
#Response.ContentFile := #Empimg.Filename
#Response.AttachmentFileName := #Surname + #GiveName + #Empno + ".jpg"
Endif
Endif
Endroutine
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) |
|
Target of the output |
Name |
Description |
CreateInstance is signalled when an instance of a component is created [Inherited from Resource Request (PRIM_WEB.ResourceRequest) |
|
DestroyInstance is signalled when an instance of a component is about to be destroyed [Inherited from Resource Request (PRIM_WEB.ResourceRequest) |
All Component Classes
Technical Reference