Skip to content

psReturnMessage - cWebModalDialog

User-defined message sent by a modal dialog to its invoking object when the dialog closes

Type: Property
Access: Read/Write
Data Type: String
Parameters: None

Syntax

{ WebProperty=Client }
Property String psReturnMessage
Access Type Syntax
Read Access: WebGet psReturnMessage to StringVariable
Write Access: WebSet psReturnMessage to StringVariable/Value

Description

By default, when a modal dialog is closed, it sends the OnCloseModalDialog callback message to the invoking object (i.e. the object that sent the Popup message to the modal dialog).

Set psReturnMessage to the name of an alternative callback message to send instead of OnCloseModalDialog when the modal dialog is closed.

The callback message must declare a single Handle parameter, i.e. the same parameter list as OnCloseModalDialog. This parameter will receive the object handle of the modal dialog that sends the callback message. As a security feature, the callback message must also be published via the WebPublishProcedure command, otherwise it will be rejected by the web application's security system.

Example:

Procedure MyCallback Handle hoDialog
    .
End_Procedure
WebPublishProcedure MyCallback

Sample

The following example demonstrates a button object that invokes a modal dialog. The default callback message has been changed to "OnCloseDialogA".

Object oShowDialogA is a cWebButton
    Set psCaption to "Dialog A"

    Procedure OnClick
        WebSet psReturnMessage of oDialogA to "OnCloseDialogA"
        Send Popup to oDialogA Self
    End_Procedure

    Procedure OnCloseDialogA Handle hoModalDialog
        //..
    End_Procedure

    WebPublishProcedure OnCloseDialogA
End_Object

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.

See Also

psReturnObject | pbServerOnEscape

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.