| 1 package xpetstore.web.struts.action.category; 2 3 import java.util.Collection ; 4 5 import xpetstore.domain.catalog.ejb.Category; 6 7 import xpetstore.web.struts.action.*; 8 9 10 16 public class CategoryForm 17 extends BaseForm 18 { 19 21 private String _categoryId = ""; 22 private Category _category = new Category( ); 23 private Collection _products; 24 25 public CategoryForm() 26 { 27 } 28 29 32 public String getCategoryId( ) 33 { 34 return _categoryId; 35 } 36 37 40 public Category getCategory( ) 41 { 42 if (_category == null) 43 _category = new Category(); 44 System.out.println("!! CategoryForm.getCategory " + _category); 45 return _category; 46 } 47 48 51 public Collection getProducts( ) 52 { 53 return _products; 54 } 55 56 60 public void setCategoryId( String categoryId ) 61 { 62 _categoryId = categoryId; 63 } 64 65 69 public void setCategory( Category category ) 70 { 71 _category = category; 72 } 73 74 78 public void setProducts( Collection products ) 79 { 80 _products = products; 81 } 82 } 83 | Popular Tags |