1 5 6 package org.infohazard.maverick.ctl; 7 8 import org.apache.commons.beanutils.BeanUtils; 9 10 15 public abstract class ThrowawayFormBeanUser extends Throwaway2 16 { 17 20 private Object formBean; 21 22 24 protected Object getForm() 25 { 26 return this.formBean; 27 } 28 29 33 public final String go() throws Exception 34 { 35 this.formBean = this.makeFormBean(); 36 37 BeanUtils.populate(this.formBean, this.getCtx().getRequest().getParameterMap()); 38 BeanUtils.populate(this.formBean, this.getCtx().getControllerParams()); 39 40 this.getCtx().setModel(this.formBean); 41 42 return this.perform(); 43 } 44 45 54 protected String perform() throws Exception 55 { 56 return SUCCESS; 57 } 58 59 66 protected Object makeFormBean() 67 { 68 return this; 69 } 70 } | Popular Tags |