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 | ComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT) |
| ComponentMembers | ComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT) |
| ComponentPatternName | ComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT) |
| ComponentTag | Generic space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT) |
| ComponentType | ComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT) |
| ComponentTypeName | ComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT) |
| Name | Name identifies the component Inherited from Object (PRIM_OBJT) |
| Owner | Owner owns this component Inherited from Object (PRIM_OBJT) |
| Parent | 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) |
| Routine | Name of the routine to be executed Inherited from Server Request (PRIM_WEB.ServerRequest) |
| ServerModule | Name of the server module Inherited from Server Request (PRIM_WEB.ServerRequest) |
| Target | Target of the output |
| Name | Description |
|---|---|
| CreateInstance | CreateInstance is signalled when an instance of a component is created Inherited from Resource Request (PRIM_WEB.ResourceRequest) |
| DestroyInstance | DestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Resource Request (PRIM_WEB.ResourceRequest) |
Febuary 18 V14SP2