URL Changes
The following images illustrate the URL changes to control the new routing features:
The Views with Routing option generates the following RDMLX sample code:
Where:
#PRIM_WEB.Router
Acts as the root of the routes tree.
#PRIM_WEB.Route
Associates a path string to a Visual LANSA web view component. It is displayed when the path string matches with the current URL path component.
The parent property of the #PRIM_WEB.Route class forms a tree of routes where the FullPath of a route is derived from the FullPath of its parent and the route owns the Path string as highlighted below:
The Link #PRIM_MD.MenuItem class enables a menu item to trigger a change to the URL path component when clicked.
Generated Template
Router(#Router)
The router property on the #PRIM_MD.ViewContainer class links a router and its set of Routes to a view container.
Path('/')
The path property on #PRIM_WEB.Route provides the location of the component that should be matched.
View(#MY_Contacts) and View(#Contact_Us)
As highlighted with red in the sample code above, the views are now associated with a route component. The route component will identify the web view class that will be used to populate the View Container when the Path('/Contacts') or Path('/Contact_us') of the route is requested.
Access(Protected)
The new Access property on #PRIM_WEB.Route is used to flag routes that are protected such as those that require authentication prior to generating the view. Developers have access to the following values (Private, Public, and *SQLNULL)