Example #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();
 }
Example #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();
 }
Example #3
0
 public void deleteCategoryAttribute() {
   categoryAttribute = categoryBean.findCategoryAttributeByID(id);
   categoryBean.removeCategoryAttribute(categoryAttribute);
   FacesContext.getCurrentInstance()
       .addMessage(
           "categoryAttributeList",
           new FacesMessage("CategoryAttribute " + categoryAttribute.getName() + " deleted."));
   this.categoryAttribute = new CategoryAttribute();
 }