📄 elsetag.java
字号:
/* * WebWork, Web Application Framework * * Distributable under Apache license. * See terms of license at opensource.org */package webwork.view.taglib;import javax.servlet.jsp.JspException;import javax.servlet.jsp.tagext.Tag;import javax.servlet.jsp.tagext.TagSupport;/** * * @author Maurice C. Parker (maurice@vineyardenterprise.com) * @version $Revision: 1.7 $ */public class ElseTag extends TagSupport { // BodyTag implementation --------------------------------------- public int doStartTag() throws JspException { Boolean ifResult = getId() == null ? (Boolean) pageContext.getAttribute(IfTag.ANSWER) : (Boolean) pageContext.getAttribute(getId()); pageContext.removeAttribute(IfTag.ANSWER); if (ifResult == null || ifResult.booleanValue() == true) { return SKIP_BODY; } else { return EVAL_BODY_INCLUDE; } } public int doEndTag() throws JspException { return super.doEndTag(); } public void release() { setId(null); super.release(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -