code: private Table buildHistoryTable(CmsHistoryResourceCollection historyList) {
  
          final CmsObject cms = A_CmsUI.getCmsObject();
          try {
              CmsBeanTableBuilder<CmsHistoryRow> builder = CmsBeanTableBuilder.newInstance(
                  CmsHistoryRow.class,
                  A_CmsUI.get().getDisplayType().toString());
              List<CmsHistoryRow> rows = Lists.newArrayList();
  
              for (CmsHistoryResourceBean bean : historyList.getResources()) {
                  final CmsHistoryResourceBean beanFinal = bean;
                  final CmsUUID structureId = bean.getStructureId();
                  CmsHistoryRow row = new CmsHistoryRow(bean);
                  rows.add(row);
                  m_group1.add(row.getCheckBoxV1());
                  m_group2.add(row.getCheckBoxV2());
                  final Integer version = bean.getVersion().getVersionNumber();
                  if (version != null) {
                      row.getRestoreButton().addClickListener(new ClickListener() {
  
                          private static final long serialVersionUID = 1L;
  
                          public void buttonClick(ClickEvent event) {
  
                              actionRestore(cms, structureId, version);
  
                          }
  
                      });
                  }
                  row.getPreviewButton().addClickListener(new ClickListener() {
  
                      private static final long serialVersionUID = 1L;
  
                      @SuppressWarnings("synthetic-access")
                      public void buttonClick(ClickEvent event) {
  
                          actionPreview(beanFinal);
  
                      }
  
                  });
                  for (CheckBox checkBox : Arrays.asList(row.getCheckBoxV1(), row.getCheckBoxV2())) {
                      checkBox.setData(bean);
                  }
              }
  
              Table result = builder.buildTable(rows);
              result.setPageLength(Math.min(rows.size(), 12));
              result.setSortEnabled(false);
              return result;
          } catch (Exception e) {
              return null;
  
          }
      }
docs: Builds a table containing the different versions of a resource.<p>
  
  @param historyList the list of history resource beans from which to construct the table
  
  @return the table