Package com.onec.ui
Interface Page
public interface Page
An authored page — a route whose content you compose in code, the page-level
peer of
EntityView. Implement it, register as a Spring bean, and the
framework resolves it for the route and compiles your composition to DivKit
(or any future renderer). Unlike the auto-generated entity surfaces, a page is
freeform: arrange widgets and custom components however you like — e.g. a
bespoke dashboard.
@Component
class DashboardPage implements Page {
public String route() { return "/"; }
public void compose(PageBuilder b) {
b.title("Dashboard");
b.widget("Properties").type("count").catalog(Property.class);
}
}
-
Method Summary
Modifier and TypeMethodDescriptionvoidCompose the page content.default Stringprofile()The profile/persona id this page applies to, ornull(default) for every profile.route()The route this page renders, e.g.default Viewportviewport()The device class this page targets, ornull(default) for every viewport.
-
Method Details
-
route
String route()The route this page renders, e.g."/"for the home/dashboard. -
profile
The profile/persona id this page applies to, ornull(default) for every profile. A profile-specific page wins over the default for that persona — the same resolution rule asEntityView. -
viewport
The device class this page targets, ornull(default) for every viewport. A viewport-specific page wins over the universal one on that device — compose a different surface (fewer widgets, a list, ...) per device. -
compose
Compose the page content.
-