psPromptUpdateCallback - cWebPromptList

Defines a custom message to be sent to the invoking object as part of the selection update process

Type: Property (Web Property)

Access: Read/Write

Data Type: String

Parameters: None

Syntax
 { WebProperty=Client }
 Property String psPromptUpdateCallback

Web Property Read Access: WebGet psPromptUpdateCallback to StringVariable
Web Property Write Access: WebSet psPromptUpdateCallback to StringVariable/Value

Read Access: Get psPromptUpdateCallback to StringVariable
Write Access: Set psPromptUpdateCallback to StringVariable/Value


Description

If psPromptUpdateCallback is set to an event message, this event will be called as part of the prompt list's selection and update process. It calls the event and passed handle of the prompt object. This is called in addition to and after the normal update. Normally, you will only use this when peUpdateMode is umPromptCustom, since the umPromptCustom mode has no automatic mechanism for updating a selection.

This property is normally set within the invoking object's Prompt_Callback event.

Object oCustomerCustomer_Number is a cWebForm
    Entry_Item Customer.Customer_Number
    Set piColumnSpan to 3
    Set piColumnIndex to 3
    Set psLabel to "Customer Num:"
    Set peLabelAlign to alignRight

    WebPublishProcedure PromptUpdateCallback 
    Procedure PromptUpdateCallback Handle hoPrompt
        Handle hoDD
        RowID riId
        Get Server of hoPrompt to hoDD    // this is the prompt's DD
        // the DD has all current DD information as does the file buffer
        // do your custom update here.       
    End_Procedure
    
    Procedure Prompt_Callback Handle hoPrompt
        WebSet psPromptUpdateCallback of hoPrompt to "PromptUpdateCallback"
        WebSet peUpdateMode of hoPrompt to umPromptCustom
    End_Procedure

End_Object


Notice that Prompt_Callback WebSets psPromptUpdateCallback by name. This must be a WebSet and not a Set and the name must be a string and not the message name or handle. This name must be correct and it must point to a method in this object that is web-published (e.g. WebPublishProcedure).

This update callback is called when the prompt selection is complete. It is passed the prompt object handle, which you can use to get whatever information you need about the selection.

psPromptUpdateCallback is not used when peUpdateMode is umPromptNonInvoking, as there is no invoking object to callback to.


About Web Properties
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.