1 package org.campware.cream.modules.screens; 2 3 42 43 import org.apache.torque.util.Criteria; 44 45 import org.apache.velocity.context.Context; 46 47 import org.campware.cream.om.ProductCategory; 48 import org.campware.cream.om.ProductCategoryPeer; 49 50 54 public class ProductCategoryForm extends CreamForm 55 { 56 protected void initScreen() 57 { 58 setModuleType(LOOKUP); 59 setModuleName("PRODUCT_CATEGORY"); 60 setIdName(ProductCategoryPeer.PRODUCT_CAT_ID); 61 setFormIdName("productcatid"); 62 } 63 64 protected boolean getEntry(Criteria criteria, Context context) 65 { 66 try 67 { 68 ProductCategory entry = (ProductCategory) ProductCategoryPeer.doSelect(criteria).get(0); 69 context.put("entry", entry); 70 return true; 71 } 72 catch (Exception e) 73 { 74 return false; 75 } 76 } 77 } 78 | Popular Tags |