1 16 17 22 package org.ditchnet.jsp.taglib.tabs.handler; 23 24 import java.io.StringWriter ; 25 import java.io.IOException ; 26 import javax.servlet.jsp.JspContext ; 27 import javax.servlet.jsp.JspException ; 28 import javax.servlet.jsp.tagext.SimpleTagSupport ; 29 30 31 39 public final class PrevTabButtonTag extends SimpleTagSupport { 40 41 private String id; 42 private String tabContainerId; 43 44 public void setId(final String id) { 45 this.id = id; 46 } 47 48 public void setTabContainerId(final String tabContainerId) { 49 this.tabContainerId = tabContainerId; 50 } 51 52 public void doTag() throws IOException , JspException { 53 54 StringWriter evalResult = new StringWriter (); 55 StringBuffer buff = evalResult.getBuffer(); 56 57 buff.append("\n\t<input type=\"button\" ") 58 .append("class=\"ditch-prev-tab-button\" ") 59 .append("onclick=\"org.ditchnet.jsp.") 60 .append("TabUtils.prevTabButtonClicked(event,'") 61 .append(tabContainerId).append("'); return false;\""); 62 if (null != id && 0 != id.length()) { 63 buff.append(" id=\"").append(id).append("\""); 64 } 65 buff.append(" value=\""); 66 getJspBody().invoke(evalResult); 67 buff.append("\" />\n"); 68 69 getJspContext().getOut().print(buff); 70 71 } 72 73 } 74 | Popular Tags |