Parameter | Description |
---|---|
hoInvokingObject | Handle of the invoking object |
Procedure NavigateForwardCustom Handle hoInvokingObject
Call: | Send NavigateForwardCustom hoInvokingObject |
This is a custom version of NavigateForward, which always navigates forward using nfUndefined.
Normally, the framework will determine what type of navigation you are performing for you. It will look at the invoking and invoked views and determine if the navigation should be from-main, from-child, from-parent or from-undefined. The type of navigation will determine how the new view is initialized. Normally, this is all you need.
You can use NavigateForwardCustom when you want the navigation to be manual (nfUndefined), even if the framework might think otherwise. This is the "I'll do this myself approach".
When performing a custom forward navigation, the new view will not be initialized automatically. You will handle this manually in OnNavigateForward. When navigating back from a custom navigation, the returning view will not be updated. You may handle this manually in OnNavigateBack.
Often when working with nfUndefined navigations, you will need to pass custom data back and forth between the views. You will do this using the tWebNavigateData's NamedValues member. This is an array of name/value pairs that you control by using the messages NamedValueAdd, NamedValueGet, NamedValueIndex and NamedValueRemove.
Navigation paths need to be registered when peApplicationStateMode is set to anything other than asmOff. This registration of all possible navigation paths is used by the framework when a deep link is opened or when the browser its back or forward button is used.
Use WebRegisterPath to register a navigation path.
Note that using NavigateForward would work just as well in this sample. The framework would determine that this is a nfUndefined navigation and work the same. This will usually be the case. NavigateForwardCustom was created for when you need to perform a custom forward navigation where the framework will see this as a normal navigation, such as nfFromMain. This is most like to occur when you are doing something unusual.
Object oStatusHelper is a cWebButton Set piColumnSpan to 4 Set psCaption to "Help Me Decide" Set piColumnIndex to 4 WebRegisterPath ntNavigateForward oZoomCustomerStatusHelp Procedure OnClick Send NavigateForwardCustom of oZoomCustomerStatusHelp Self // note that using NavigateForward would work just as well in this sample End_Procedure Procedure OnGetNavigateForwardData tWebNavigateData ByRef NavigateData Handle hoToView String sValue Boolean bChecked Get GetChecked of oCustomerStatus to bChecked WebGet psValue of oCustomerName to sValue Get NamedValueAdd NavigateData.NamedValues "name" sValue to NavigateData.NamedValues Get NamedValueAdd NavigateData.NamedValues "status" bChecked to NavigateData.NamedValues End_Procedure Procedure OnNavigateBack Handle hoCallback tWebNavigateData NavigateData Boolean bFound bOldStat bNewStat String sValue Get NamedValueGet NavigateData.NamedValues "newstatus" to sValue Get GetChecked of oCustomerStatus to bOldStat Move (sValue="1") to bNewStat If (bNewStat<>bOldStat) Begin Send SetChecked of oCustomerStatus bNewStat WebSet pbChanged of oCustomerStatus to True End End_Procedure End_ObjectSee Also
NavigateBegin | NavigateCancel | NavigateCancelTo | NavigateClose | NavigateCloseTo