Resource Request (PRIM_WEB.ResourceRequest)

Request to download a resource

Ancestors - Server Request (PRIM_WEB.ServerRequest) Object (PRIM_OBJT)

Details

A ResourceRequest is the definition of a server routine used to download individual objects.

Example

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

Properties

NameDescription
ComponentClassNameComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT)
ComponentMembersComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT)
ComponentPatternNameComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT)
ComponentTagGeneric space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT)
ComponentTypeComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT)
ComponentTypeNameComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT)
NameName identifies the component Inherited from Object (PRIM_OBJT)
OwnerOwner owns this component Inherited from Object (PRIM_OBJT)
ParentThe 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)
RoutineName of the routine to be executed Inherited from Server Request (PRIM_WEB.ServerRequest)
ServerModuleName of the server module Inherited from Server Request (PRIM_WEB.ServerRequest)
TargetTarget of the output

Events

NameDescription
CreateInstanceCreateInstance is signalled when an instance of a component is created Inherited from Resource Request (PRIM_WEB.ResourceRequest)
DestroyInstanceDestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Resource Request (PRIM_WEB.ResourceRequest)

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2