Skip to content

HeaderButton

Roman Pinyazhin edited this page Jul 12, 2020 · 2 revisions

Describes button in the header of dialog screen. It contains the following fields:

  • String id (required)
  • String caption
  • String description
  • String icon
  • String styleName
  • Boolean sanitizeHtml
  • boolean descriptionAsHtml
  • boolean enabled
  • Consumer<ButtonClickEvent> clickHandler

Fields which can be changed at runtime:

  • caption;
  • icon;
  • description;
  • styleName;
  • enabled.

For instance:

@Subscribe("headerButtons.iconBtn")
private void onIconBtnClickEvent(HeaderButton.ButtonClickEvent event) {
    event.getButton().setIcon(CubaIcon.ANCHOR);
    event.getButton().setCaption("Another caption");
}

Clone this wiki locally