/**
  * Read controller from the request.
  *
  * @return the search controller
  */
 private SearchController readController() {
   FacesContextBroker broker = new FacesContextBroker();
   @SuppressWarnings("unused")
   FacesContext fc = broker.getFacesContext();
   // intentionally not used
   SearchController controller =
       (SearchController) broker.resolveManagedBean(JSFBEAN_SEARCH_CONTROLLER);
   controller.setSearchCriteria(this.getCriteria());
   return controller;
 }
  /**
   * Read SearchCriteria from the session.
   *
   * @return the search controller
   */
  private SearchCriteria readSessionCriteria() {
    FacesContextBroker broker = new FacesContextBroker();
    @SuppressWarnings("unused")
    FacesContext fc = broker.getFacesContext();
    fc.getApplication().getViewHandler().createView(fc, SEARCH_PAGE);

    // intentionally not used
    SearchCriteria criteria = (SearchCriteria) broker.resolveManagedBean(JSFBEAN_SEARCH_CRITERIA);

    return criteria;
  }