ServletRequest request = this.pageContext.getRequest();
RequestContext reqCtx = (RequestContext) request.getAttribute(RequestContext.REQCTX);
try {
List<String> requiredFacets = this.getRequiredFacets();
IFacetNavHelper facetNavHelper = (IFacetNavHelper) ApsWebApplicationUtils.getBean(JpFacetNavSystemConstants.CONTENT_FACET_NAV_HELPER, this.pageContext);
Map<String, Integer> occurrences = facetNavHelper.getOccurences(requiredFacets, reqCtx);
List<ITreeNode> facetsForTree = this.getFacetRootNodes(reqCtx);
this.pageContext.setAttribute(this.getFacetsTreeParamName(), facetsForTree);
this.pageContext.setAttribute("occurrences", occurrences);
request.setAttribute(this.getRequiredFacetsParamName(), requiredFacets);