DDFieldEntryMessage - cWebBaseDEO

Executes the DDO field entry message for the data column bound to this DEO

Type: Procedure

Parameters: None

Syntax
Procedure DDFieldEntryMessage 

Call: Send DDFieldEntryMessage


Description

DataDictionary objects (DDOs) have field entry and exit messages associated with each DD column. In Windows applications, these messages are sent during focus entry and exit. With web applications, these messages are not automatically sent. This process is not automatic because 1) this would increase the number of round trips between a client and server, 2) the asynchronous nature of the browser-server communication makes focus entering and exiting problematic (the focus change has already occurred) and 3) these DD field messages were often defined to work with Windows data entry objects (DEOs) and do not work properly with web controls.

The normal web focus entry event is OnFocus and the web focus exit event is OnBlur. By default, these events are not sent to the server and if they were, they would do nothing. If you wish to use these events on the server, you must enable them by setting pbServerOnFocus or pbServerOnBlur to True and then create whatever code you wish in the OnFocus and OnBlur events. If you wish to bind these events to your DD field entering and exiting messages, you must do so manually inside of these events. You can do this using DDFieldEntryMessage and DDFieldExitMessage messages.

Object oCustomerCustomer_Number is a cWebForm
    Entry_Item Customer.Customer_Number

    Set pbServerOnFocus to True
    Procedure OnFocus
        Send DDFieldEntryMessage
    End_Procedure            

End_Object


Note that these events cannot be used to stop the focus change. They can be used to move the focus elsewhere, but this should be used with care as the asynchronous nature of the browser-server focus change may not feel smooth. If possible, avoid using server side focus and blur events.