return redirect("admin", "info.save.success");
}
String newCategory = get("newCategory");
if (StringUtils.isNotBlank(newCategory)) {
if (entityDao.get(Category.class, "name", newCategory).isEmpty()) {
CategoryBean category = new CategoryBean();
category.setName(newCategory);
entityDao.saveOrUpdate(category);
return redirect("admin", "info.save.success");
} else {
return redirect("admin", "info.save.failure");
}