Prompt_Callback - cWebBaseDEO

Sends a callback event to an object that requested a prompt object

Type: Event

Parameters: Handle hoPrompt

ParameterDescription
hoPromptHandle of prompt object being invoked


Syntax
Procedure Prompt_Callback Handle hoPrompt

Description

When prompt list objects (cWebPromptList) are invoked, they send a callback message to their invoking object. This message, Prompt_Callback, is passed the object handle of the prompt object. This message must be understood by the invoking object. This can be used to customize the prompt object for the particular invoking object. This enables you to use a single prompt list for multiple purposes. Normally, this message sets properties in the cWebPromptList object.

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.