code: public void updateSearchBean(CmsGallerySearchBean searchBean) {
  
          m_searchBean = searchBean;
          if (searchBean != null) {
              m_pageSize = searchBean.getMatchesPerPage();
              int lastPage = searchBean.getLastPage();
              // we don't just store the search bean because it gets reused for multiple searches
              // and so the result list may change.
              m_resultBeans = searchBean.getResults();
              if (lastPage != -1) {
                  loadPage(lastPage);
                  m_firstShownPage = lastPage;
                  if (lastPage > 1) {
                      loadPage(lastPage - 1);
                      m_firstShownPage = lastPage - 1;
                  }
              }
          } else {
              m_resultBeans = null;
          }
      }
docs: Updates the handler with a new search bean.<p>
  
  @param searchBean the search bean