code: public void setAccordion(boolean accordion) {
          getElement().setAttribute("data-collapsible", accordion ? CssName.ACCORDION : CssName.EXPANDABLE);
          reload();
      }
docs: Configure if you want this collapsible container to
  accordion its child elements or use expandable.