To continue with this content, please log in with your Data Access ID or create a new account.
You may not be authorized to see this content. Please contact Data Access Europe for more information.
You are not authorized to see this content.
Lesson 4 - Navigation Paths
- Another important concept in History Management in DataFlex is Navigation Paths.
- Navigation paths are used within the framework to determine how an app navigates from one view to the next. Each navigation path must be registered for the history management to function as intended.
- To do this, an instruction called WebRegisterPath is used in a view or object that performs the navigation.
- WebRegisterPath takes several parameters being:
- eNavigationMode - The type of navigation to perform.
- Valid values are: ntNavigateForward, ntNavigateForwardCustom, nfNavigateBegin
- hoNavigateView - The handle of the view object to navigate to
- hoInvokingObject - (optional) By default Self
- sStateKey - (optional) Custom state key to be used in the State Hash’s navigation path id
- Finally, to perform the navigation a new instruction called Send NavigatePath is added.
- To fix the navigation for a menu item and a button on a dashboard
- Staring from the same example in Lesson 3…
- First, find the menu item in our WebApp source, and register the navigation path:
- WebRegisterPath ntNavigateBegin oVwPersonSelect
- WebRegisterPath is called, ntNavigateBegin is sued to perform a NavigateBegin and oVwPersonSelect is where it is being navigated to.
- Next, NavigatePath is called with Send NavigatePath.
- Next, is the button on the dashboard (open Dashboard.wo), which is largely treated the same way.
- WebRegisterPath ntNavigateForward oVwPersonSelect
- So WebRegisterPath is called, ntNavigateForward is used to perform a Forward navigation this time
- and tell it once again to navigate to oVwPersonSelect.
- Send NavigatePath is also used here.
- Compile and run the application to show that the menu item shows oVwPersonSelect, and the button on the dashboard does the same.