boolean commonResourceType = false;
Integer resourceTypeId = (Integer) session.getAttribute(Constants.RESOURCE_TYPE_ATTR);
if (resourceTypeId != null) {
if (resourceTypeManager.ensureResourceType(subject, resourceTypeId, resourceIds) == false) {
ResourceType compatibleResourceType = resourceTypeManager.getResourceTypeById(subject,
resourceTypeId);
newForm.setResourceTypeName(compatibleResourceType.getName());
newForm.setResourceTypeId(resourceTypeId);