1 13 package com.tonbeller.wcf.toolbar; 14 15 import javax.servlet.jsp.JspException ; 16 17 import com.tonbeller.wcf.component.Component; 18 import com.tonbeller.wcf.controller.RequestContext; 19 20 25 public class FormButtonTag extends ToolButtonTag { 26 String action; 27 String forward; 28 String form; 29 30 33 protected ToolButtonModel getToolButtonModel(RequestContext context) throws JspException { 34 Component f = (Component)context.getModelReference(form); 35 if (f == null) 36 throw new JspException ("could not find form " + form); 37 FormButtonModel fm = new FormButtonModel(f); 38 fm.setAction(action); 39 fm.setForward(forward); 40 return fm; 41 } 42 43 47 public void setAction(String action) { 48 this.action = action; 49 } 50 51 55 public void setForward(String forward) { 56 this.forward = forward; 57 } 58 59 62 public void setForm(String string) { 63 form = string; 64 } 65 66 } 67 | Popular Tags |