📄 defaulttei.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -