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.TurbineRole; 48 import org.campware.cream.om.TurbineRolePeer; 49 50 54 public class RoleForm extends CreamForm 55 { 56 protected void initScreen() 57 { 58 setModuleType(LOOKUP); 59 setModuleName("TURBINE_ROLE"); 60 setIdName(TurbineRolePeer.ROLE_ID); 61 setFormIdName("roleid"); 62 } 63 64 protected boolean getEntry(Criteria criteria, Context context) 65 { 66 try 67 { 68 TurbineRole entry = (TurbineRole) TurbineRolePeer.doSelect(criteria).get(0); 69 context.put("entry", entry); 70 context.put("entryitems", entry.getTurbineRolePermissions()); 71 72 return true; 73 } 74 catch (Exception e) 75 { 76 return false; 77 } 78 } 79 80 protected boolean getNew(Context context) 81 { 82 try 83 { 84 TurbineRole entry = new TurbineRole(); 85 context.put("entry", entry); 86 87 return true; 88 } 89 catch (Exception e) 90 { 91 return false; 92 } 93 } 94 95 } 96 | Popular Tags |