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

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

?? optiontag.java

?? struts的源代碼
?? JAVA
字號:
/*
 * $Id: OptionTag.java 54929 2004-10-16 16:38:42Z germuska $ 
 *
 * Copyright 1999-2004 The Apache Software Foundation.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.struts.taglib.html;

import java.util.Locale;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;

import org.apache.struts.Globals;
import org.apache.struts.taglib.TagUtils;
import org.apache.struts.util.MessageResources;

/**
 * Tag for select options.  The body of this tag is presented to the user
 * in the option list, while the value attribute is the value returned to
 * the server if this option is selected.
 *
 * @version $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
 */
public class OptionTag extends BodyTagSupport {

    // ----------------------------------------------------- Instance Variables

    /**
     * The default locale for our server.
     * @deprecated Use Locale.getDefault() directly.
     */
    protected static final Locale defaultLocale = Locale.getDefault();

    /**
     * The message resources for this package.
     */
    protected static MessageResources messages =
        MessageResources.getMessageResources(Constants.Package + ".LocalStrings");

    /**
     * The message text to be displayed to the user for this tag (if any)
     */
    protected String text = null;

    // ------------------------------------------------------------- Properties

    /**
     * The name of the servlet context attribute containing our message
     * resources.
     */
    protected String bundle = Globals.MESSAGES_KEY;

    public String getBundle() {
        return (this.bundle);
    }

    public void setBundle(String bundle) {
        this.bundle = bundle;
    }

    /**
     * Is this option disabled?
     */
    protected boolean disabled = false;

    public boolean getDisabled() {
        return (this.disabled);
    }

    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    /**
     * The key used to look up the text displayed to the user for this
     * option, if any.
     */
    protected String key = null;

    public String getKey() {
        return (this.key);
    }

    public void setKey(String key) {
        this.key = key;
    }

    /**
     * The name of the attribute containing the Locale to be used for
     * looking up internationalized messages.
     */
    protected String locale = Globals.LOCALE_KEY;

    public String getLocale() {
        return (this.locale);
    }

    public void setLocale(String locale) {
        this.locale = locale;
    }

    /**
     * The style associated with this tag.
     */
    private String style = null;

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    /**
     * The named style class associated with this tag.
     */
    private String styleClass = null;

    public String getStyleClass() {
        return styleClass;
    }

    public void setStyleClass(String styleClass) {
        this.styleClass = styleClass;
    }

    /**
     * The identifier associated with this tag.
     */
    protected String styleId = null;

    /**
     * Return the style identifier for this tag.
     */
    public String getStyleId() {

        return (this.styleId);

    }

    /**
     * Set the style identifier for this tag.
     *
     * @param styleId The new style identifier
     */
    public void setStyleId(String styleId) {

        this.styleId = styleId;

    }

    /**
     * The server value for this option, also used to match against the
     * current property value to determine whether this option should be
     * marked as selected.
     */
    protected String value = null;

    public String getValue() {
        return (this.value);
    }

    public void setValue(String value) {
        this.value = value;
    }

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

    /**
     * Process the start of this tag.
     *
     * @exception JspException if a JSP exception has occurred
     */
    public int doStartTag() throws JspException {

        // Initialize the placeholder for our body content
        this.text = null;

        // Do nothing until doEndTag() is called
        return (EVAL_BODY_TAG);

    }

    /**
     * Process the body text of this tag (if any).
     *
     * @exception JspException if a JSP exception has occurred
     */
    public int doAfterBody() throws JspException {

        if (bodyContent != null) {
            String text = bodyContent.getString();
            if (text != null) {
                text = text.trim();
                if (text.length() > 0) {
                    this.text = text;
                }
            }
        }
        return (SKIP_BODY);

    }

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

        TagUtils.getInstance().write(pageContext, this.renderOptionElement());

        return (EVAL_PAGE);
    }

    /**
     * Generate an HTML %lt;option> element.
     * @throws JspException
     * @since Struts 1.1
     */
    protected String renderOptionElement() throws JspException {
        StringBuffer results = new StringBuffer("<option value=\"");
        
        results.append(this.value);
        results.append("\"");
        if (disabled) {
            results.append(" disabled=\"disabled\"");
        }
        if (this.selectTag().isMatched(this.value)) {
            results.append(" selected=\"selected\"");
        }
        if (style != null) {
            results.append(" style=\"");
            results.append(style);
            results.append("\"");
        }
        if (styleId != null) {
            results.append(" id=\"");
            results.append(styleId);
            results.append("\"");
        }
        if (styleClass != null) {
            results.append(" class=\"");
            results.append(styleClass);
            results.append("\"");
        }
        results.append(">");

        results.append(text());
        
        results.append("</option>");
        return results.toString();
    }

    /**
     * Acquire the select tag we are associated with.
     * @throws JspException
     */
    private SelectTag selectTag() throws JspException {
        SelectTag selectTag =
            (SelectTag) pageContext.getAttribute(Constants.SELECT_KEY);
            
        if (selectTag == null) {
            JspException e =
                new JspException(messages.getMessage("optionTag.select"));
                
            TagUtils.getInstance().saveException(pageContext, e);
            throw e;
        }
        
        return selectTag;
    }

    /**
     * Release any acquired resources.
     */
    public void release() {
        super.release();
        bundle = Globals.MESSAGES_KEY;
        disabled = false;
        key = null;
        locale = Globals.LOCALE_KEY;
        style = null;
        styleClass = null;
        text = null;
        value = null;
    }

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

    /**
     * Return the text to be displayed to the user for this option (if any).
     *
     * @exception JspException if an error occurs
     */
    protected String text() throws JspException {
        String optionText = this.text;

        if ((optionText == null) && (this.key != null)) {
            optionText =
                TagUtils.getInstance().message(pageContext, bundle, locale, key);
        }

        // no body text and no key to lookup so display the value
        if (optionText == null) {
            optionText = this.value;    
        }

        return optionText;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕av资源一区| 在线不卡中文字幕| 国产午夜亚洲精品不卡| 国内精品伊人久久久久av影院| 欧美理论片在线| 偷拍亚洲欧洲综合| 欧美丰满嫩嫩电影| 免费在线观看成人| 2023国产精品自拍| 成人午夜在线播放| 亚洲色图制服丝袜| 欧美精品一二三| 另类小说欧美激情| 亚洲国产精品二十页| 99亚偷拍自图区亚洲| 亚洲黄一区二区三区| 欧美日韩激情在线| 久久99精品一区二区三区三区| 26uuu国产日韩综合| 成人午夜av电影| 亚洲精品欧美二区三区中文字幕| 欧美视频中文字幕| 激情综合色播五月| 国产精品高潮呻吟| 91麻豆精品国产91久久久久久久久 | 99国产精品久久久久久久久久| 亚洲黄色小说网站| 日韩午夜激情免费电影| 国产成人自拍在线| 夜夜嗨av一区二区三区中文字幕| 91精品久久久久久久91蜜桃| 国产福利91精品| 亚洲成人资源在线| 国产亚洲一本大道中文在线| 欧美在线视频你懂得| 精品在线观看视频| 一区二区三区日韩精品| 精品欧美一区二区在线观看| 99久久夜色精品国产网站| 美女网站在线免费欧美精品| 亚洲少妇中出一区| 久久亚洲综合av| 欧美一a一片一级一片| 国产综合成人久久大片91| 亚洲一区日韩精品中文字幕| 国产亚洲一二三区| 日韩西西人体444www| 色哟哟在线观看一区二区三区| 久久aⅴ国产欧美74aaa| 亚洲精品精品亚洲| 中文字幕不卡在线观看| 欧美一区二区视频免费观看| 97超碰欧美中文字幕| 国内精品第一页| 丝袜美腿亚洲一区| 一区二区在线观看av| 国产欧美一二三区| 26uuu精品一区二区在线观看| 欧美绝品在线观看成人午夜影视| 99国产精品视频免费观看| 国产精品白丝jk黑袜喷水| 日韩成人免费看| 亚洲成a人片综合在线| 中文字幕一区在线观看视频| 欧美精品一区二区三区在线播放| 欧美日韩精品三区| 91麻豆精品秘密| 成人福利视频网站| 成人性生交大片免费看中文| 国产在线一区观看| 国产在线播放一区| 久久99久久久久| 韩国成人在线视频| 久久疯狂做爰流白浆xx| 日韩国产精品久久久久久亚洲| 亚洲一区二区三区激情| 亚洲综合一二区| 亚洲女人小视频在线观看| 中文字幕中文字幕中文字幕亚洲无线| 久久久噜噜噜久久中文字幕色伊伊| 日韩一区二区三区电影在线观看| 欧美日韩在线播放三区四区| 欧美艳星brazzers| 欧美日韩精品欧美日韩精品一 | 91成人免费网站| 91网站最新地址| 91在线观看成人| 91视频在线观看| 色婷婷精品久久二区二区蜜臀av| 色婷婷av一区| 欧美伦理影视网| 欧美成人女星排名| 久久久噜噜噜久久人人看 | 日韩专区在线视频| 蜜桃av一区二区在线观看| 蜜臀av国产精品久久久久| 麻豆一区二区三| 国产精品99久久不卡二区| 成人性色生活片| 91首页免费视频| 欧美福利一区二区| 精品粉嫩超白一线天av| 国产欧美日韩精品在线| 成人欧美一区二区三区在线播放| 亚洲你懂的在线视频| 亚洲国产成人精品视频| 天天操天天干天天综合网| 蜜桃91丨九色丨蝌蚪91桃色| 国产在线精品一区二区不卡了| 大尺度一区二区| 一本色道**综合亚洲精品蜜桃冫| 在线观看不卡一区| 欧美va在线播放| 国产精品午夜春色av| 亚洲综合区在线| 极品尤物av久久免费看| 99久久亚洲一区二区三区青草| 欧美日韩1234| 久久精品视频在线免费观看| 亚洲男女一区二区三区| 日本女优在线视频一区二区| 国产精品一线二线三线精华| 色婷婷国产精品| 久久综合五月天婷婷伊人| 亚洲视频香蕉人妖| 麻豆高清免费国产一区| 不卡av在线网| 日韩精品中午字幕| 一区二区三区**美女毛片| 久久国产乱子精品免费女| 99精品在线观看视频| 日韩午夜av电影| 亚洲精品乱码久久久久久| 久久成人精品无人区| 欧美性一二三区| 欧美国产日韩在线观看| 免费成人在线视频观看| 色综合久久88色综合天天 | 国内精品久久久久影院薰衣草| 97久久久精品综合88久久| 精品免费一区二区三区| 亚洲精品日日夜夜| 成人涩涩免费视频| 日韩三级av在线播放| 一区二区三区小说| 国产成+人+日韩+欧美+亚洲| 日韩一区二区在线看片| 亚洲影视在线播放| jlzzjlzz亚洲女人18| 久久一区二区三区国产精品| 三级在线观看一区二区| 91黄视频在线| 一区免费观看视频| 粉嫩13p一区二区三区| 精品人在线二区三区| 午夜不卡在线视频| 欧美亚一区二区| 亚洲欧洲日韩在线| 成人h动漫精品一区二区| 国产亚洲精品bt天堂精选| 久久国产精品色婷婷| 日韩视频免费观看高清在线视频| 亚洲一区二区三区不卡国产欧美| 91一区二区在线观看| 中文字幕一区二区三区在线不卡| 韩国欧美国产一区| 26uuu成人网一区二区三区| 激情六月婷婷久久| 精品捆绑美女sm三区| 久99久精品视频免费观看| 91精品婷婷国产综合久久性色| 亚洲自拍与偷拍| 91福利在线播放| 亚洲自拍都市欧美小说| 91国偷自产一区二区三区成为亚洲经典| 国产精品女同一区二区三区| 国产99久久久精品| 日本一区二区动态图| av毛片久久久久**hd| 亚洲欧美日韩在线不卡| 91丨porny丨最新| 亚洲影视在线播放| 欧美一区二区三区免费大片| 日韩精品1区2区3区| 日韩精品一区二区在线| 激情文学综合丁香| 国产精品素人视频| 色诱视频网站一区| 午夜精品123| 精品少妇一区二区三区在线播放 | 2024国产精品| 99久久精品免费看国产| 亚洲人成7777| 精品视频在线视频| 久久国内精品自在自线400部| 久久久久久综合| 99久久婷婷国产精品综合| 亚洲国产精品久久人人爱蜜臀 | 色综合 综合色| 天天av天天翘天天综合网 |