亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? formtag.java

?? struts的源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
    /** Sets the disabled event handler. */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    /** Returns the disabled event handler. */
    public boolean isDisabled() {
        return disabled;
    }

    /** Sets the readonly event handler. */
    public void setReadonly(boolean readonly) {
        this.readonly = readonly;
    }

    /** Returns the readonly event handler. */
    public boolean isReadonly() {
        return readonly;
    }


    // --------------------------------------------------------- Public Methods

    /**
     * Render the beginning of this form.
     *
     * @exception JspException if a JSP exception has occurred
     */
    public int doStartTag() throws JspException {

        // Look up the form bean name, scope, and type if necessary
        this.lookup();

        // Create an appropriate "form" element based on our parameters
        StringBuffer results = new StringBuffer();
        
        results.append(this.renderFormStartElement());

        results.append(this.renderToken());

        TagUtils.getInstance().write(pageContext, results.toString());

        // Store this tag itself as a page attribute
        pageContext.setAttribute(Constants.FORM_KEY, this, PageContext.REQUEST_SCOPE);

        this.initFormBean();

        return (EVAL_BODY_INCLUDE);

    }

    /**
     * Locate or create the bean associated with our form.
     * @throws JspException
     * @since Struts 1.1
     */
    protected void initFormBean() throws JspException {
        int scope = PageContext.SESSION_SCOPE;
        if ("request".equalsIgnoreCase(beanScope)) {
            scope = PageContext.REQUEST_SCOPE;
        }
        
        Object bean = pageContext.getAttribute(beanName, scope);
        if (bean == null) {
            // New and improved - use the values from the action mapping
            bean =
                RequestUtils.createActionForm(
                    (HttpServletRequest) pageContext.getRequest(),
                    mapping,
                    moduleConfig,
                    servlet);
            if (bean instanceof ActionForm) {
                ((ActionForm) bean).reset(mapping, (HttpServletRequest) pageContext.getRequest());
            }
            if (bean == null) {
                throw new JspException(messages.getMessage("formTag.create", beanType));
            }
            pageContext.setAttribute(beanName, bean, scope);
        }
        pageContext.setAttribute(Constants.BEAN_KEY, bean, PageContext.REQUEST_SCOPE);
    }

    /**
     * Generates the opening <code>&lt;form&gt;</code> element with appropriate
     * attributes.
     * @since Struts 1.1
     */
    protected String renderFormStartElement() {
            
        StringBuffer results = new StringBuffer("<form");

        // render attributes
        renderName(results);
        
        renderAttribute(results, "method", getMethod() == null ? "post" : getMethod());
        renderAction(results);
        renderAttribute(results, "accept-charset", getAcceptCharset());
        renderAttribute(results, "class", getStyleClass());
        renderAttribute(results, "enctype", getEnctype());
        renderAttribute(results, "onreset", getOnreset());
        renderAttribute(results, "onsubmit", getOnsubmit());
        renderAttribute(results, "style", getStyle());
        renderAttribute(results, "target", getTarget());

        // Hook for additional attributes
        renderOtherAttributes(results);

        results.append(">");
        return results.toString();
    }

    /**
     * Renders the name of the form.  If XHTML is set to true, the name will
     * be rendered as an 'id' attribute, otherwise as a 'name' attribute.
     */
    protected void renderName(StringBuffer results) {
        if (this.isXhtml()) {
            if (getStyleId() == null) {
                renderAttribute(results, "id", beanName);
            } else {
                renderAttribute(results, "id", getStyleId());
            }
        } else {    
            renderAttribute(results, "name", beanName);
            renderAttribute(results, "id", getStyleId());
        }    
    }

    /**
     * Renders the action attribute
     */
    protected void renderAction(StringBuffer results) {

        HttpServletResponse response =
            (HttpServletResponse) this.pageContext.getResponse();

        results.append(" action=\"");
        results.append(
            response.encodeURL(
                TagUtils.getInstance().getActionMappingURL(
                    this.action,
                    this.pageContext)));
                
        results.append("\"");
    }

    /**
     * 'Hook' to enable this tag to be extended and 
     *  additional attributes added.
     */
    protected void renderOtherAttributes(StringBuffer results) {
    }

    /**
     * Generates a hidden input field with token information, if any. The
     * field is added within a div element for HTML 4.01 Strict compliance.
     * @return A hidden input field containing the token.
     * @since Struts 1.1
     */
    protected String renderToken() {
        StringBuffer results = new StringBuffer();
        HttpSession session = pageContext.getSession();

        if (session != null) {
            String token =
                (String) session.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
                
            if (token != null) {
                results.append("<div><input type=\"hidden\" name=\"");
                results.append(Constants.TOKEN_KEY);
                results.append("\" value=\"");
                results.append(token);
                if (this.isXhtml()) {
                    results.append("\" />");
                } else {
                    results.append("\">");
                }
                results.append("</div>");
            }
        }

        return results.toString();
    }

    /**
     * Renders attribute="value" if not null
     */
    protected void renderAttribute(StringBuffer results, String attribute, String value) {
        if (value != null) {
            results.append(" ");
            results.append(attribute);
            results.append("=\"");
            results.append(value);
            results.append("\"");
        }
    }

    /**
     * Render the end of this form.
     *
     * @exception JspException if a JSP exception has occurred
     */
    public int doEndTag() throws JspException {

        // Remove the page scope attributes we created
        pageContext.removeAttribute(Constants.BEAN_KEY, PageContext.REQUEST_SCOPE);
        pageContext.removeAttribute(Constants.FORM_KEY, PageContext.REQUEST_SCOPE);

        // Render a tag representing the end of our current form
        StringBuffer results = new StringBuffer("</form>");

        // Render JavaScript to set the input focus if required
        if (this.focus != null) {
            results.append(this.renderFocusJavascript());
        }

        // Print this value to our output writer
        JspWriter writer = pageContext.getOut();
        try {
            writer.print(results.toString());
        } catch (IOException e) {
            throw new JspException(messages.getMessage("common.io", e.toString()));
        }

        // Continue processing this page
        return (EVAL_PAGE);

    }

    /**
     * Generates javascript to set the initial focus to the form element given in the
     * tag's "focus" attribute.
     * @since Struts 1.1
     */
    protected String renderFocusJavascript() {
        StringBuffer results = new StringBuffer();

        results.append(lineEnd);
        results.append("<script type=\"text/javascript\"");
        if (!this.isXhtml() && this.scriptLanguage) {
            results.append(" language=\"JavaScript\"");
        }
        results.append(">");
        results.append(lineEnd);

        // xhtml script content shouldn't use the browser hiding trick
        if (!this.isXhtml()) {
            results.append("  <!--");
            results.append(lineEnd);
        }

        // Construct the control name that will receive focus.
        // This does not include any index.
        StringBuffer focusControl = new StringBuffer("document.forms[\"");
        focusControl.append(beanName);
        focusControl.append("\"].elements[\"");
        focusControl.append(this.focus);
        focusControl.append("\"]");

        results.append("  var focusControl = ");
        results.append(focusControl.toString());
        results.append(";");
        results.append(lineEnd);
        results.append(lineEnd);

        results.append("  if (focusControl.type != \"hidden\" && !focusControl.disabled) {");
        results.append(lineEnd);

        // Construct the index if needed and insert into focus statement
        String index = "";
        if (this.focusIndex != null) {
            StringBuffer sb = new StringBuffer("[");
            sb.append(this.focusIndex);
            sb.append("]");
            index = sb.toString();
        }
        results.append("     focusControl");
        results.append(index);
        results.append(".focus();");
        results.append(lineEnd);

        results.append("  }");
        results.append(lineEnd);

        if (!this.isXhtml()) {
            results.append("  // -->");
            results.append(lineEnd);
        }

        results.append("</script>");
        results.append(lineEnd);
        return results.toString();
    }

    /**
     * Release any acquired resources.
     */
    public void release() {

        super.release();
        action = null;
        moduleConfig = null;
        enctype = null;
        disabled = false;
        focus = null;
        focusIndex = null;
        mapping = null;
        method = null;
        onreset = null;
        onsubmit = null;
        readonly = false;
        servlet = null;
        style = null;
        styleClass = null;
        styleId = null;
        target = null;
        acceptCharset = null;

    }

    // ------------------------------------------------------ Protected Methods


    /**
     * Look up values for the <code>name</code>, <code>scope</code>, and
     * <code>type</code> properties if necessary.
     *
     * @exception JspException if a required value cannot be looked up
     */
    protected void lookup() throws JspException {

        // Look up the module configuration information we need
        moduleConfig = TagUtils.getInstance().getModuleConfig(pageContext);

        if (moduleConfig == null) {
            JspException e = new JspException(messages.getMessage("formTag.collections"));
            pageContext.setAttribute(Globals.EXCEPTION_KEY, e, PageContext.REQUEST_SCOPE);
            throw e;
        }
        servlet =
            (ActionServlet) pageContext.getServletContext().getAttribute(
                Globals.ACTION_SERVLET_KEY);

        // Look up the action mapping we will be submitting to
        String mappingName = TagUtils.getInstance().getActionMappingName(action);
        mapping = (ActionMapping) moduleConfig.findActionConfig(mappingName);
        if (mapping == null) {
            JspException e = new JspException(messages.getMessage("formTag.mapping", mappingName));
            pageContext.setAttribute(Globals.EXCEPTION_KEY, e, PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the form bean definition
        FormBeanConfig formBeanConfig = moduleConfig.findFormBeanConfig(mapping.getName());
        if (formBeanConfig == null) {
            JspException e =
                new JspException(messages.getMessage("formTag.formBean", mapping.getName(), action));
            pageContext.setAttribute(Globals.EXCEPTION_KEY, e, PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Calculate the required values
        beanName = mapping.getAttribute();
        beanScope = mapping.getScope();
        beanType = formBeanConfig.getType();
    }

    /**
     * Returns true if this tag should render as xhtml.
     */
    private boolean isXhtml() {
        return TagUtils.getInstance().isXhtml(this.pageContext);
    }

    /**
     * Returns the focusIndex.
     * @return String
     */
    public String getFocusIndex() {
        return focusIndex;
    }

    /**
     * Sets the focusIndex.
     * @param focusIndex The focusIndex to set
     */
    public void setFocusIndex(String focusIndex) {
        this.focusIndex = focusIndex;
    }

    /**
     * Gets whether or not the focus script's &lt;script&gt; element will include the 
     * language attribute.
     * @return true if language attribute will be included.
     * @since Struts 1.2
     */
    public boolean getScriptLanguage() {
        return this.scriptLanguage;
    }

    /**
     * Sets whether or not the focus script's &lt;script&gt; element will include the 
     * language attribute.
     * @since Struts 1.2
     */
    public void setScriptLanguage(boolean scriptLanguage) {
        this.scriptLanguage = scriptLanguage;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
无吗不卡中文字幕| 国产一区二区三区黄视频 | 亚洲色图在线看| 91麻豆精品国产自产在线观看一区| 国产91精品免费| 蜜桃久久久久久久| 亚洲黄色录像片| 日本一区二区三区免费乱视频| 欧美精品在线观看播放| 97精品久久久午夜一区二区三区 | 国产欧美一区二区在线| 91精品中文字幕一区二区三区| 97久久精品人人爽人人爽蜜臀| 国产真实精品久久二三区| 日韩精品一区第一页| 亚洲免费伊人电影| 中文字幕+乱码+中文字幕一区| 欧美一区二区三区在线观看视频| 色综合久久久久久久久| 欧美日韩国产a| 91蜜桃婷婷狠狠久久综合9色| 国产盗摄女厕一区二区三区| 精品在线播放午夜| 日本aⅴ免费视频一区二区三区| 亚洲影院在线观看| 亚洲欧美自拍偷拍色图| 中文在线一区二区| 国产亚洲欧洲一区高清在线观看| 精品乱码亚洲一区二区不卡| 91麻豆精品国产91久久久久久久久 | 亚洲一区二区中文在线| 亚洲美女在线国产| 亚洲欧洲制服丝袜| 亚洲男人天堂av网| 亚洲精品高清在线| 一区二区三区四区蜜桃| 亚洲精品中文在线影院| 亚洲老妇xxxxxx| 一级中文字幕一区二区| 亚洲一线二线三线视频| 亚洲综合无码一区二区| 亚洲成人精品一区| 蜜臀av一区二区在线观看| 免费美女久久99| 国产一区二区三区黄视频| 国产精品夜夜嗨| 盗摄精品av一区二区三区| 成人av在线网| 日本电影亚洲天堂一区| 精品视频1区2区| 欧美一级欧美一级在线播放| 欧美tk—视频vk| 中文字幕的久久| 亚洲美女区一区| 日本午夜一本久久久综合| 蜜桃精品在线观看| 国产精品一区二区无线| 91亚洲精品乱码久久久久久蜜桃 | 久久婷婷国产综合国色天香| 亚洲国产成人在线| 最新成人av在线| 亚洲成人资源网| 久久国产欧美日韩精品| 国产精品白丝jk白祙喷水网站| av在线不卡电影| 精品视频在线免费| 欧美精品一区二区三区高清aⅴ| 国产精品无遮挡| 亚洲午夜久久久久久久久久久| 青青草国产精品97视觉盛宴| 国产精品白丝av| 欧美色网站导航| 久久精品欧美一区二区三区不卡 | 亚洲国产精品自拍| 美国十次综合导航| 成人aa视频在线观看| 欧美精品亚洲二区| 日本一区二区三区免费乱视频| 亚洲黄色av一区| 国产一区二区女| 色噜噜久久综合| 精品久久久久久最新网址| 亚洲婷婷综合色高清在线| 美女一区二区三区在线观看| 成人免费va视频| 日韩欧美国产一区二区三区| 亚洲欧洲国产日韩| 麻豆国产精品视频| 91精彩视频在线| 久久久亚洲综合| 日韩国产欧美一区二区三区| av一二三不卡影片| 欧美大片一区二区三区| 亚洲精品成a人| 国产一区二区不卡老阿姨| 欧美日韩一区二区三区四区五区 | 精品久久久久一区| 亚洲一区二区三区四区在线观看| 国产精品正在播放| 欧美二区乱c少妇| 亚洲一区国产视频| 99久久精品一区二区| 26uuu亚洲综合色| 奇米777欧美一区二区| 色又黄又爽网站www久久| 2019国产精品| 免费观看日韩电影| 欧美日韩久久久久久| 亚洲色图欧洲色图婷婷| 大陆成人av片| 国产欧美一区二区精品婷婷| 麻豆国产精品视频| 这里只有精品视频在线观看| 一区二区三区视频在线看| 成人av午夜影院| 国产喷白浆一区二区三区| 美女一区二区三区在线观看| 91精品国产综合久久福利 | 高清在线成人网| 精品成人私密视频| 蜜芽一区二区三区| 337p亚洲精品色噜噜| 亚洲电影中文字幕在线观看| 在线精品视频免费播放| 一区二区三区鲁丝不卡| 精品日本一线二线三线不卡| 丝袜亚洲另类丝袜在线| 在线观看不卡一区| 一区二区三区四区乱视频| 在线免费不卡视频| 亚洲午夜免费视频| 欧美视频自拍偷拍| 五月综合激情婷婷六月色窝| 欧美肥妇free| 久久国产精品72免费观看| 欧美一区二区视频在线观看| 人禽交欧美网站| 欧美mv和日韩mv国产网站| 久久99久久精品| 久久久久久影视| 国产精品一区三区| 亚洲国产高清在线| www.欧美亚洲| 亚洲男人的天堂在线观看| 色狠狠av一区二区三区| 亚洲国产日韩综合久久精品| 欧美视频完全免费看| 日本系列欧美系列| 欧美成va人片在线观看| 国产成人亚洲综合a∨婷婷| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 亚洲一区二区3| 欧美一区二区三区思思人| 久久精品国产久精国产| 久久久精品国产免大香伊 | 91麻豆精东视频| 亚洲国产综合在线| 日韩免费视频一区二区| 国产精品一二二区| 一区二区在线观看免费 | 亚洲欧洲综合另类| 欧美日本一道本| 国产美女在线观看一区| 国产精品久久精品日日| 欧美日韩国产片| 激情图片小说一区| 亚洲欧洲在线观看av| 欧美精品一卡二卡| 国产剧情av麻豆香蕉精品| 亚洲色图第一区| 日韩免费一区二区| 99麻豆久久久国产精品免费优播| 午夜精品123| 欧美国产欧美亚州国产日韩mv天天看完整| 99综合电影在线视频| 三级一区在线视频先锋| 国产日韩欧美激情| 欧美日韩激情一区| 国产高清一区日本| 午夜精品福利久久久| 国产精品免费视频网站| 欧美乱妇一区二区三区不卡视频| 豆国产96在线|亚洲| 日韩激情一二三区| 国产精品天干天干在观线| 欧美一级日韩不卡播放免费| 91免费在线播放| 久久精品国产成人一区二区三区 | 亚洲精品在线观看网站| 一本久久a久久免费精品不卡| 免费日本视频一区| 亚洲欧美日韩一区二区三区在线观看| 欧美一级午夜免费电影| 99精品欧美一区二区蜜桃免费 | 亚洲三级免费电影| 欧美一区二区二区| 91福利视频网站| 成人av资源在线| 久久99国产精品久久99| 日韩中文字幕1|