NavigateCloseTo - cWebView

Works the similar to NavigateClose, except you can close all views in the stack up to hoView, which will then become the top view in a mobile web application (drilldown interface)

Type: Procedure

Parameters: Handle hoView Handle hoCallback

ParameterDescription
hoViewHandle of the view to become the top view in the stack
hoCallbackHandle to an object in the view that is being closed. This is used to set custom return information to the invoking view.


Syntax
Procedure NavigateCloseTo Handle hoView Handle hoCallback

Call: Send NavigateCloseTo hoView hoCallback


Description

NavigateCloseTo performs a NavigateClose back to a specified object in the view stack.

NavigateCloseTo is a cross between NavigateClose and NavigateCancelTo. It works the same as NavigateClose, except you can close all views in the stack up to hoView, which will then become the top view in a mobile web application (peApplicationStyle = wvsDrillDown).

It works the similar to NavigateCancelTo, except it has the capability to pass back data to hoView. When you just want to close a number of views in the stack and not update the view being closed to, you should use NavigateCancelTo in preference to NavigateCloseTo.

Closing multiple views and returning and updating data to the new top view is a complicated process. Using NavigateCancelTo should be considered advanced usage.

Normally, a closed view updates the view that invoked it, which is the view above it in the view stack (cWebViewStack) . Those views are updated based on how the view was forward navigated to from that view. Depending on the navigate-from type (from-main, from-child, from-parent), different kinds of updates are automatically applied to the new top view. When you are closing multiple view levels, the updating relationship between the view being closed and the new top view cannot be determined. Therefore, the navigate from type (tWebNavigateData's eNavigateType member) will be changed to nfUndefined. This means that no automatic update is applied and any update must be handled manually in the OnNavigateBack event.

You would probably do this by using tWebNavigateData's NamedValues array member. You would set this information in the closing view's OnGetNavigateBackData event using NamedValueAdd. You would use this information in OnNavigateBack in the view being closed to using NamedValueGet and NamedValueIndex. It is your design responsibility to determine what your name/value pair interface will look like and it will be used.

See Also

NavigateBegin | NavigateCancel | NavigateCancelTo | NavigateClose | NavigateForward | NavigateForwardCustom