defaulttei.java

来自「It gives some some of examples of java s」· Java 代码 · 共 58 行

JAVA
58
字号
package examples;import javax.servlet.jsp.tagext.*;/** * A TagExtraInfo class that can be used when the tag defines an object * using an id. * * The tag is expected to have an optional attribute with name id. * The scope is from the end of the tag. */public class DefaultTEI extends TagExtraInfo {      /**     * Constructor     */    public DefaultTEI() {	super();    }    /**     * information on scripting variables defined by this tag     *     * @param data The translation-time TagData instance.     */    public VariableInfo[] getVariableInfo(TagData data) {	String idValue = data.getId();	if (idValue == null) { 	    return new VariableInfo[0];	} else {	    VariableInfo info		= new VariableInfo(idValue,				   "java.lang.String",				   true,				   VariableInfo.AT_END);	    VariableInfo[] back = { info } ;	    return back;	}    }    /**     * Translation-time validation of the attributes.  The argument is a     * translation-time, so request-time attributes are indicated as such.     *     * @param data The translation-time TagData instance.     */    public boolean isValid(TagData data) {	return true;    }}

⌨️ 快捷键说明

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