Annotation Interface Route
Example:
Screen annotated with @Route("help")
corresponds to "/app/{rootRoute}/help
" route,
where {rootRoute} equals to currently opened root screen.
This screen will be opened when URL changes from "/app/{rootRoute}
" to "/app/{rootRoute}/help
"
and URL will be changed in the same way when the screen is opened.
Required parent screen that should be opened to form a route can be specified with "parent" property. If this
property is set but parent screen isn't opened annotated screen route will not be applied.
The "parentPrefix" property enables to merge common route parts if a route of previous screen in tab is the same as
route configured in this property.
Example. Let two screens exist:
@Route("orders") public class OrderBrowse { ... } @Route(route = "orders/edit", parentPrefix = "orders") public class OrderEdit { ... }When OrderEdit screen is opened after OrderBrowse screen resulting address will be "
app/{rootRoute}/users/edit
".
It allows to specify clear routes for each screen and avoid repeats in URL.
Annotated class must be a direct or indirect subclass of Screen
.
The "root" property enables to specify that the route is for root window (like LoginWindow or MainWindow).
- See Also:
-
Field Details
-
VALUE_ATTRIBUTE
- See Also:
-
PATH_ATTRIBUTE
- See Also:
-
PARENT_PREFIX_ATTRIBUTE
- See Also:
-
ROOT_ATTRIBUTE
- See Also:
-
-
Element Details
-
value
- Default:
- ""
-
path
- Default:
- ""
-
parentPrefix
String parentPrefix- Default:
- ""
-
root
boolean root- Default:
- false
-