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.Currency; 48 import org.campware.cream.om.CurrencyPeer; 49 50 54 public class CurrencyForm extends CreamForm 55 { 56 protected void initScreen() 57 { 58 setModuleType(LOOKUP); 59 setModuleName("CURRENCY"); 60 setIdName(CurrencyPeer.CURRENCY_ID); 61 setFormIdName("currencyid"); 62 } 63 64 protected boolean getEntry(Criteria criteria, Context context) 65 { 66 try 67 { 68 Currency entry = (Currency) CurrencyPeer.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 protected boolean getNew(Context context) 79 { 80 try 81 { 82 Currency entry = new Currency(); 83 context.put("entry", entry); 84 return true; 85 } 86 catch (Exception e) 87 { 88 return false; 89 } 90 } 91 92 93 } 94 | Popular Tags |