@TabFactory("Content")
 public void contentTab(UiConfig cfg, TabBuilder tab) {
   tab.fields(
       cfg.fields.text("title").label("Title"),
       cfg.fields
           .checkbox("hideInNavigation")
           .label("Hide in navigation")
           .description("Check this box to hide this page in navigation")
           .buttonLabel(""),
       cfg.fields
           .checkbox("requireLogin")
           .label("require login")
           .description("Check this box to require login")
           .buttonLabel(""));
 }
  /**
   * Dialog factory associated to the Main page settings.
   *
   * @param dialog
   */
  @DialogFactory("main-dialog")
  public void homeDialog(UiConfig cfg, TabBuilder tab) {

    tab.fields(
        cfg.fields.text("title").label("Main page settings"),
        cfg.fields
            .checkbox("hideInNavigation")
            .label("Hide in navigation")
            .description("Check this box to hide this page in navigation")
            .buttonLabel(""),
        cfg.fields
            .checkbox("requireLogin")
            .label("require login")
            .description("Check this box to require login")
            .buttonLabel(""));
  }