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

📄 formtag.java

📁 一个实用工具类
💻 JAVA
字号:
/* * Copyright (C) butor.com. All rights reserved. * * This software is published under the terms of the GNU Library General * Public License (GNU LGPL), a copy of which has been included with this * distribution in the LICENSE.txt file.  */package org.butor.web.taglib.html;import javax.servlet.ServletRequest;import javax.servlet.jsp.JspException;/** * @author nacroaz * * To change this generated comment edit the template variable "typecomment": * Window>Preferences>Java>Templates. */public class FormTag extends org.apache.struts.taglib.html.FormTag {	public static final String FIRST_FORM_TAG = "first_form_tag";		protected boolean f_isFirstFormTag = false;		public FormTag getFirstFormTag() {		ServletRequest request = pageContext.getRequest();		return (FormTag) request.getAttribute(FIRST_FORM_TAG);	}		protected FormTag setFirstFormTag(FormTag tag) {		ServletRequest request = pageContext.getRequest();				FormTag oldFormTag = (FormTag) request.getAttribute(FIRST_FORM_TAG);				if (tag != null) {			request.setAttribute(FIRST_FORM_TAG, tag);			} else {			request.removeAttribute(FIRST_FORM_TAG);		}				return oldFormTag;	}		public int doStartTag() throws JspException {				FormTag formTag = getFirstFormTag();		if (formTag == null) {			f_isFirstFormTag = true;			setFirstFormTag(this);			return super.doStartTag();		}					return EVAL_BODY_INCLUDE;	}	/**	 * Render the end of this form.	 *	 * @exception JspException if a JSP exception has occurred	 */	public int doEndTag() throws JspException {		if (f_isFirstFormTag) {			setFirstFormTag(null);			return super.doEndTag();			}					return EVAL_PAGE;	}}

⌨️ 快捷键说明

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