Parameter | Description |
---|---|
hoCallback | Handle to an object in the view that is being closed. You could use this to WebGet any data from this object or the view. |
NavigateData | This can be used to process an update manually. If you change this NavigateData, this will change the automatic update processing. |
Procedure OnNavigateBack Handle hoCallback tWebNavigateData NavigateData
The OnNavigateBack event is sent to the object that invoked the view that is being closed in a mobile web application (drilldown interface).
It can be used to handle any custom updates that might be required. This event is the last thing that occurs in a close navigation - at this point the navigation is complete.
When the view about to be closed was navigated to, it was sent the message NavigateForward, passing an hoInvokingObject parameter. Usually, this is the object within the invoking view that sent the NavigateForward message. This is the object that will receive this event. This allows the object that started the forward navigation to decide what to do when the view it navigated to is closed. For example, if a data entry object (DEO) in a Zoom view navigated forward to a Select view that presented a list of validation codes, the DEO would receive this message when the view was closed.
This will mostly be used when the navigate-from type is nfUndefined. When NavigateClose encounters an nfUndefined, it performs no automatic update on the invoking view. OnNavigateBack provides you an opportunity to perform your own update.
We will use the example of a Select view that is a validation list. As this view is closed, OnGetNavigateBackData might have been called to load the selected validation value into NavigateData.NamedValues. This could be used in the invoking DEO as follows:
Object oCustomerState is a cWebForm Entry_Item Customer.State Set psLabel to "State" Set pbPromptButton to True Procedure OnPrompt Register_Object oSelectValidationValue Send NavigateForward of oSelectValidationValue Self End_Procedure Procedure OnNavigateBack Handle hoCallback tWebNavigateData NavigateData String sValue Get NamedValueGet NavigateData.NamedValues "ReturnValue" to sValue WebSet psValue to sValue WebSet pbChanged to True End_Procedure End_Object
When NavigateData.eNavigateType is not nfUndefined, you will usually not change the data in NavigateData, as this may interfere with any automatic update processing. As noted, when NavigateData.eNavigateType is nfUndefined, there is no automatic processing and OnNavigateBack provides you an opportunity to perform your own.