示例#1
0
 // Actions
 public void newCategoryAttribute() {
   categoryAttribute.setCategoryID(categoryBean.findCategoryByID(categoryid));
   categoryBean.addCategoryAttribute(categoryAttribute);
   FacesContext.getCurrentInstance()
       .addMessage(
           "newCategoryAttribute",
           new FacesMessage("CategoryAttribute " + categoryAttribute.getName() + " created."));
   this.categoryAttribute = new CategoryAttribute();
 }
示例#2
0
 public void editCategoryAttribute() {
   categoryAttribute.setCategoryID(categoryBean.findCategoryByID(categoryid));
   //        System.out.println(categoryAttribute.getCategoryID());
   //        System.out.println(categoryAttribute.getCategoryAttributeID());
   //        System.out.println(categoryAttribute.getDescription());
   //        System.out.println(categoryAttribute.getName());
   categoryBean.updateCategoryAttribute(categoryAttribute);
   FacesContext.getCurrentInstance()
       .addMessage(
           "newCategoryAttribute",
           new FacesMessage("CategoryAttribute " + categoryAttribute.getName() + " edited."));
   this.categoryAttribute = new CategoryAttribute();
 }