Deprecated API

Contents

  • Terminally Deprecated Elements
    Element
    Description
    Declare dashboard widgets in a Page bean instead, e.g.
      class DashboardPage implements Page {
          public String route() { return "/"; }
          public void compose(PageBuilder page) {
              page.widget("Recent invoices")
                  .type("list").order(0).width("1/2")
                  .document(Invoice.class)
                  .maxItems(8);
          }
      }
    
    As of the page/layout migration the dashboard is built from authored pages (surfaced through the DivKit home surface, e.g. /api/divkit/home); this annotation is no longer consulted when the configurer declares any widgets, and will be removed in the next release. (Note: there is no /api/ui/metadata/* REST endpoint — see the README/AGENTS.md for the real /api/... surface.)
    Configure field hints in an EntityView or Layout bean instead, e.g.
      class InvoiceView implements EntityView {
          public Class<?> entity() { return Invoice.class; }
          public void fields(EntityConfigBuilder f) {
              f.field("total").order(10).hideInForm()
               .field("notes").widget("textarea");
          }
      }
    
    Layout-configured hints override this annotation. The annotation will be removed in the next release.

    One exception: tabular section row classes (e.g. line-item rows inside a document's @TabularSection). The DSL does not yet expose tabular section field hints; use @UiHint on those row classes only when custom row-field hints are still required.

    Assign entities to sidebar sections in a Layout bean instead, e.g.
      class MainLayout implements Layout {
          public void configure(LayoutSpec layout) {
              layout.section("Sales").order(0).icon("euro")
              .document(Invoice.class)
              .catalog(Customer.class);
          }
      }
    
    Layout beans are the source of truth for the sidebar (served at /api/ui/metadata/layout); this annotation is currently echoed only onto the per-entity metadata response as a section field that the React frontend does not consume. The annotation will be removed in the next release.
  • Deprecated Annotation Interfaces
    Annotation Interface
    Description
    Declare dashboard widgets in a Page bean instead, e.g.
      class DashboardPage implements Page {
          public String route() { return "/"; }
          public void compose(PageBuilder page) {
              page.widget("Recent invoices")
                  .type("list").order(0).width("1/2")
                  .document(Invoice.class)
                  .maxItems(8);
          }
      }
    
    As of the page/layout migration the dashboard is built from authored pages (surfaced through the DivKit home surface, e.g. /api/divkit/home); this annotation is no longer consulted when the configurer declares any widgets, and will be removed in the next release. (Note: there is no /api/ui/metadata/* REST endpoint — see the README/AGENTS.md for the real /api/... surface.)
    Configure field hints in an EntityView or Layout bean instead, e.g.
      class InvoiceView implements EntityView {
          public Class<?> entity() { return Invoice.class; }
          public void fields(EntityConfigBuilder f) {
              f.field("total").order(10).hideInForm()
               .field("notes").widget("textarea");
          }
      }
    
    Layout-configured hints override this annotation. The annotation will be removed in the next release.

    One exception: tabular section row classes (e.g. line-item rows inside a document's @TabularSection). The DSL does not yet expose tabular section field hints; use @UiHint on those row classes only when custom row-field hints are still required.

    Assign entities to sidebar sections in a Layout bean instead, e.g.
      class MainLayout implements Layout {
          public void configure(LayoutSpec layout) {
              layout.section("Sales").order(0).icon("euro")
              .document(Invoice.class)
              .catalog(Customer.class);
          }
      }
    
    Layout beans are the source of truth for the sidebar (served at /api/ui/metadata/layout); this annotation is currently echoed only onto the per-entity metadata response as a section field that the React frontend does not consume. The annotation will be removed in the next release.