📄 foreachtei.java
字号:
package examples;import javax.servlet.jsp.tagext.*;/** * A TagExtraInfo class for the TagExtraInfo * * The tag is has 2 required attributes, row and in. * We assume that the taglibrary accurately describes this requirement. * * The value of row defines a scripting variable within the scope * of the tag. */public class ForEachTEI extends TagExtraInfo { /** * Constructor */ public ForEachTEI() { super(); } /** * Define a nested variable for the ResultSet. */ public VariableInfo[] getVariableInfo(TagData data) { String rowValue = data.getAttributeString("row"); if (rowValue == null) { throw new Error("TagLibrary inconsistency"); } VariableInfo info = new VariableInfo(rowValue, "java.sql.ResultSet", true, VariableInfo.NESTED); VariableInfo[] back = { info } ; return back; } /** * No further checks. */ public boolean isValid(TagData data) { return true; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -