elsetag.java

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

JAVA
49
字号
/* * 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 + =
减小字号Ctrl + -
显示快捷键?