{
Integer resourceId = WebUtility.getRequiredIntRequestParameter(request,
ParamConstants.RESOURCE_ID_PARAM);
ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
Resource resource = resourceManager.getResourceById(subject, resourceId);
ResourceUIBean resourceUIBean = new ResourceUIBean(resource, subject);
request.setAttribute(AttrConstants.RESOURCE_ATTR, resource);
request.setAttribute(AttrConstants.RESOURCE_ID_ATTR, resourceId);
request.setAttribute(AttrConstants.TITLE_PARAM_ATTR, resource.getName());
request.setAttribute(AttrConstants.PERFORMANCE_SUPPORTED_ATTR, resourceUIBean.getFacets().isCallTime());
}
} catch (ResourceNotFoundException e) {
RequestUtils.setError(request, MessageConstants.ERR_RESOURCE_NOT_FOUND);
}
}