|
JSF+Spring+Hibernate的实例讲解(原创翻译)(12) this.serviceLocator.getCatalogService().saveProdUCt(prodUCt); //Store the current prodUCt id inside the session bean. //For the use of image uploader. FacesUtils.getSessionBean().setCurrentProdUCtId(this.id); //Remove the prodUCtList inside the cache. this.logger.debug("remove ProdUCtListBean from cache"); FacesUtils.resetManagedBean(BeanNames.PRODUCT_LIST_BEAN); } catch (DuplicateProdUCtIdException de) { String msg = "ProdUCt id already exists"; this.logger.info(msg); FacesUtils.addErrorMessage(msg); return NavigationResults.RETRY; } catch (Exception e) { String msg = "Could not save prodUCt"; this.logger.error(msg, e); FacesUtils.addErrorMessage(msg + ": Internal Error"); return NavigationResults.FAILURE;
|