Package com.onec.ui

Interface Layout


public interface Layout
An authored layout — the structural peer of Page and EntityView. One Layout bean describes one persona's shell: its navigation sections, nav presentation, branding, and (for personas) the roles that resolve into it.

The default layout (profile() == null) is the back-office shell served to anyone who matches no persona. A persona layout (profile() == "cleaning") declares its target roles and its own curated sections. A layout never widens access — RBAC still gates every data endpoint.

 @Component
 class MainLayout implements Layout {
     public void configure(LayoutSpec s) {
         s.shell().nav(NavStyle.SIDEBAR);
         s.section("Rentals").icon("house")
             .catalog(Property.class, c -> c.field("displayName").order(0));
     }
 }
 
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Build this layout's sections, shell, branding and (for personas) roles.
    default String
    The persona id this layout builds, or null for the default shell.
    default Viewport
    The device class this layout targets, or null (default) to apply to every viewport.
  • Method Details

    • profile

      default String profile()
      The persona id this layout builds, or null for the default shell.
    • viewport

      default Viewport viewport()
      The device class this layout targets, or null (default) to apply to every viewport. A viewport-specific layout fully replaces the universal one for the same profile() on that device — author a separate Layout bean per device to curate nav and presentation independently.
    • configure

      void configure(LayoutSpec spec)
      Build this layout's sections, shell, branding and (for personas) roles.