📄 formtag.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 + -