code: private void setClickListener() {
  
          m_ok.addClickListener(new Button.ClickListener() {
  
              private static final long serialVersionUID = 6621475980210242125L;
  
              public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
  
                  try {
                      CmsResourceFilter filter = getType() == null
                      ? CmsResourceFilter.ALL
                      : CmsResourceFilter.requireType(getType());
                      results.addResult(
                          new CmsResourceTypeStatResult(
                              getType(),
                              (String)m_siteSelect.getValue(),
                              getCmsObject().readResources("/", filter, true).size()));
                      m_results.setVisible(true);
                      results.setVerticalLayout(m_resLayout, false);
                  } catch (CmsException e) {
                      LOG.error("Unable to read resource tree", e);
                  }
              }
          });
      }
docs: Sets the click listener for the ok button.<p>