⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pushtag.java

📁 webwork source
💻 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;

/**
 * Find the specified value using the ValueStack and then
 * push it on top of the stack. The stack is popped when
 * the end of the tag is reached.
 *
 * @author Dick Zetterberg (dick@transitor.se)
 * @version $Revision: 1.1 $
 */
public class PushTag extends WebWorkTagSupport
{
   // Attributes ----------------------------------------------------
   protected String valueAttr;

   // Public --------------------------------------------------------
   public void setValue(String inName)
   {
      valueAttr = inName;
   }

   public int doStartTag() throws JspException
   {
   	// Find the value and push it onto the stack
      Object value = findValue(valueAttr);
      getStack().pushValue(value);
      return EVAL_BODY_INCLUDE;
   }

   public int doEndTag() throws JspException
   {
   	// Pop the value from the stack
      getStack().popValue();
      return EVAL_PAGE;
   }
}

⌨️ 快捷键说明

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