Class Place
LoadData.
The route is the full pattern including parameter placeholders (e.g. "/users/:id" or
"/configuration/:item?"). The path is the route with optional parameter segments removed — it represents the
shortest concrete URL that matches the route. For routes without optional parameters, route() and path()
return the same value.
Routes support both required parameters (e.g. ":id") and optional parameters (e.g. ":id?"). Optional
parameters must be trailing — they can only appear at the end of the route.
If the route has parameters, the PlaceManager will collect them and pass them to the page when calling
Page.elements(Place, Parameter, LoadedData).
If the page has a LoadData, the PlaceManager will call it and pass the loaded data as LoadedData to
the page when calling Page.elements(Place, Parameter, LoadedData).
If a title is given, the PlaceManager will change the document title accordingly. If a custom root selector or
element is given, the PlaceManager will replace the contents of that element with the Page registered for
this place.
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()path()Returns the route with optional parameter segments removed.static Placeroot(HTMLElement element) root(Supplier<HTMLElement> root) route()Returns the full route pattern including parameter placeholders (e.g.title()Returns the title, ornullif none was set.toString()
-
Method Details
-
place
-
equals
-
hashCode
-
toString
-
title
-
root
-
root
-
root
-
root
-
loader
-
route
Returns the full route pattern including parameter placeholders (e.g."/users/:id"or"/configuration/:path?"). -
path
-
title
Returns the title, ornullif none was set.
-