Work in progress
Routing and URL Parameters
HasUrlParameter
defines the setParameter method that is invoked by Router based on values extracted from the URL. The method will always be invoked before a navigation target is activated.
In the following code snippet we define a navigation target that takes a string parameter and produces a greeting string from it, which the target then sets as its own text content on navigation.
On startup this navigation target will automatically be configured to every path of the form greet/<anything>, except in the case where a separate navigation target with an exact has been configured to match greet/<some specific path> the exact navigation target takes precedence when resolving the URL.
URL parameters can be annotated using @OptionalParameter
to have the route match both greet and greet/<anything>.
In cases where more parameters are wanted the URL parameter can also be annotated with to have the route match greet and anything after for instance greet/one/five/three
Java