1 7 package com.inversoft.verge.mvc.view.jsp.html; 8 9 10 import java.io.IOException ; 11 12 import javax.servlet.jsp.JspException ; 13 14 import org.apache.log4j.Logger; 15 16 import com.inversoft.verge.mvc.view.HtmlViewToolkit; 17 18 19 26 public class SubmitTag extends BaseControllerTag { 27 28 31 private static final Logger logger = Logger.getLogger(SubmitTag.class); 32 33 34 45 public int doStartTag() throws JspException { 46 47 initialize(); 49 50 StringBuffer buf = new StringBuffer (); 51 createSubmitTag(buf, getId(), localName, localValue); 52 53 if (logger.isDebugEnabled()) { 54 logger.debug("The submit tag: " + buf.toString()); 55 } 56 57 try { 58 pageContext.getOut().print(buf.toString()); 59 } catch (IOException ioe) { 60 throw new JspException (ioe.toString()); 61 } 62 63 return SKIP_BODY; 64 } 65 66 76 protected void createSubmitTag(StringBuffer buf, String id, String name, 77 Object value) { 78 String valueStr = (value == null) ? null : value.toString(); 79 HtmlViewToolkit.createSubmitTag(buf, id, name, valueStr, 80 attributes, singleAttrs); 81 } 82 } | Popular Tags |