textfieldtag.java

来自「webwork source」· Java 代码 · 共 67 行

JAVA
67 行
字号
/* * WebWork, Web Application Framework * * Distributable under Apache license. * See terms of license at opensource.org */package webwork.view.taglib.ui;import javax.servlet.jsp.JspException;/** *	<b>textfield</b> tag. * *	@author Rickard 謆erg (rickard@dreambean.com) *	@version $Revision: 1.4 $ */public class TextFieldTag extends AbstractHTMLComponentTag{   // Attributes ----------------------------------------------------   protected String sizeAttr;   protected String maxLengthAttr;   protected String readonlyAttr;   protected String onkeyupAttr;   // Public --------------------------------------------------------   public String getTemplate()   {      return "text";   }   public void setSize(String aSize)   {      this.sizeAttr = aSize;   }   public void setMaxlength(String aMaxLength)   {      this.maxLengthAttr = aMaxLength;   }   public void setReadonly(String readonly)   {      this.readonlyAttr = readonly;   }   public void setOnkeyup(String onkeyup)   {      this.onkeyupAttr = onkeyup;   }   // BodyTag implementation ----------------------------------------   public int doEndTag()      throws JspException   {      if (sizeAttr != null)         this.addParameter("size",findValue(sizeAttr));      if (maxLengthAttr != null)         this.addParameter("maxlength", findValue(maxLengthAttr));      if (readonlyAttr != null)         this.addParameter("readonly", findValue(readonlyAttr));      if (onkeyupAttr != null)         this.addParameter("onkeyup", findValue(onkeyupAttr));      return super.doEndTag();   }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?