public void deleteCategoryAttribute() {
   categoryAttribute = categoryBean.findCategoryAttributeByID(id);
   categoryBean.removeCategoryAttribute(categoryAttribute);
   FacesContext.getCurrentInstance()
       .addMessage(
           "categoryAttributeList",
           new FacesMessage("CategoryAttribute " + categoryAttribute.getName() + " deleted."));
   this.categoryAttribute = new CategoryAttribute();
 }
 // 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();
 }
 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();
 }
 public ArrayList<SelectItem> getCategories() {
   categories.clear();
   List<Category> allCategory = categoryBean.findAllCategory();
   Iterator it = allCategory.iterator();
   while (it.hasNext()) {
     Category cat = (Category) it.next();
     SelectItem select = new SelectItem();
     select.setLabel(cat.getName());
     select.setValue(cat.getCategoryID());
     categories.add(select);
   }
   return categories;
 }
 public List<CategoryAttribute> getAllCategoryAttribute() {
   return categoryBean.findAllCategoryAttributes();
 }
 public void editCategoryAttributeSetup() {
   categoryAttribute = categoryBean.findCategoryAttributeByID(id);
 }