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 Type
    Method
    Description
    void
    Compose the page content.
    default String
    The profile/persona id this page applies to, or null (default) for every profile.
    The route this page renders, e.g.
    default Viewport
    The device class this page targets, or null (default) for every viewport.
  • Method Details

    • route

      String route()
      The route this page renders, e.g. "/" for the home/dashboard.
    • profile

      default String profile()
      The profile/persona id this page applies to, or null (default) for every profile. A profile-specific page wins over the default for that persona — the same resolution rule as EntityView.
    • viewport

      default Viewport viewport()
      The device class this page targets, or null (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

      void compose(PageBuilder b)
      Compose the page content.