1 5 package com.opensymphony.webwork.views.jsp.ui; 6 7 import com.opensymphony.webwork.components.Form; 8 import com.opensymphony.webwork.components.UIBean; 9 import com.opensymphony.xwork.util.OgnlValueStack; 10 11 import javax.servlet.http.HttpServletRequest ; 12 import javax.servlet.http.HttpServletResponse ; 13 14 15 21 public class FormTag extends AbstractUITag { 22 String action; 23 String target; 24 String enctype; 25 String method; 26 String namespace; 27 String validate; 28 String onsubmit; 29 30 public UIBean getBean(OgnlValueStack stack, HttpServletRequest req, HttpServletResponse res) { 31 return new Form(stack, req, res); 32 } 33 34 protected void populateParams() { 35 super.populateParams(); 36 37 Form form = ((Form) bean); 38 form.setAction(action); 39 form.setTarget(target); 40 form.setEnctype(enctype); 41 form.setMethod(method); 42 form.setNamespace(namespace); 43 form.setValidate(validate); 44 form.setOnselect(onsubmit); 45 } 46 47 public void setAction(String action) { 48 this.action = action; 49 } 50 51 public void setTarget(String target) { 52 this.target = target; 53 } 54 55 public void setEnctype(String enctype) { 56 this.enctype = enctype; 57 } 58 59 public void setMethod(String method) { 60 this.method = method; 61 } 62 63 public void setNamespace(String namespace) { 64 this.namespace = namespace; 65 } 66 67 public void setValidate(String validate) { 68 this.validate = validate; 69 } 70 71 public void setOnsubmit(String onsubmit) { 72 this.onsubmit = onsubmit; 73 } 74 } 75 | Popular Tags |