use of org.broadleafcommerce.common.page.dto.NullPageDTO in project BroadleafCommerce by BroadleafCommerce.
the class PageHandlerMapping method getHandlerInternal.
@Override
protected Object getHandlerInternal(HttpServletRequest request) throws Exception {
BroadleafRequestContext context = BroadleafRequestContext.getBroadleafRequestContext();
if (context != null && context.getRequestURIWithoutContext() != null) {
String requestUri = URLDecoder.decode(context.getRequestURIWithoutContext(), charEncoding);
Boolean internalValidateFindPreviouslySet = false;
PageDTO page;
try {
if (!BroadleafRequestContext.getBroadleafRequestContext().getInternalValidateFind()) {
BroadleafRequestContext.getBroadleafRequestContext().setInternalValidateFind(true);
internalValidateFindPreviouslySet = true;
}
page = pageService.findPageByURI(context.getLocale(), requestUri, buildMvelParameters(request), context.isSecure());
} finally {
if (internalValidateFindPreviouslySet) {
BroadleafRequestContext.getBroadleafRequestContext().setInternalValidateFind(false);
}
}
if (page != null && !(page instanceof NullPageDTO)) {
context.getRequest().setAttribute(PAGE_ATTRIBUTE_NAME, page);
return controllerName;
}
}
return null;
}
Aggregations