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

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

?? selecttag.java

?? 這是STRUTS1.2。6的開發包。。這是我從芝APACHE網站下下來
?? JAVA
字號:
/*
 * $Id: SelectTag.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.lang.reflect.InvocationTargetException;

import javax.servlet.jsp.JspException;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.taglib.TagUtils;
import org.apache.struts.util.MessageResources;

/**
 * Custom tag that represents an HTML select element, associated with a
 * bean property specified by our attributes.  This tag must be nested
 * inside a form tag.
 *
 * @version $Rev: 54929 $ $Date: 2004-10-16 09:38:42 -0700 (Sat, 16 Oct 2004) $
 */
public class SelectTag extends BaseHandlerTag {


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


    /**
     * The actual values we will match against, calculated in doStartTag().
     */
    protected String match[] = null;


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


    /**
     * Should multiple selections be allowed.  Any non-null value will
     * trigger rendering this.
     */
    protected String multiple = null;

    public String getMultiple() {
        return (this.multiple);
    }

    public void setMultiple(String multiple) {
        this.multiple = multiple;
    }


    /**
     * The name of the bean containing our underlying property.
     */
    protected String name = Constants.BEAN_KEY;

    public String getName() {
        return (this.name);
    }

    public void setName(String name) {
        this.name = name;
    }


    /**
     * The property name we are associated with.
     */
    protected String property = null;


    /**
     * The saved body content of this tag.
     */
    protected String saveBody = null;


    /**
     * How many available options should be displayed when this element
     * is rendered?
     */
    protected String size = null;

    public String getSize() {
        return (this.size);
    }

    public void setSize(String size) {
        this.size = size;
    }


    /**
     * The value to compare with for marking an option selected.
     */
    protected String value = null;


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


    /**
     * Does the specified value match one of those we are looking for?
     *
     * @param value Value to be compared.
     */
    public boolean isMatched(String value) {
        if ((this.match == null) || (value == null)) {
            return false;
        }
        
        for (int i = 0; i < this.match.length; i++) {
            if (value.equals(this.match[i]))
                return true;
        }
        
        return false;
    }


    /**
     * Return the property name.
     */
    public String getProperty() {

        return (this.property);

    }


    /**
     * Set the property name.
     *
     * @param property The new property name
     */
    public void setProperty(String property) {

        this.property = property;

    }


    /**
     * Return the comparison value.
     */
    public String getValue() {

        return (this.value);

    }


    /**
     * Set the comparison value.
     *
     * @param value The new comparison value
     */
    public void setValue(String value) {

        this.value = value;

    }


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


    /**
     * Render the beginning of this select tag.
     * <p>
     * Support for indexed property since Struts 1.1
     *
     * @exception JspException if a JSP exception has occurred
     */
    public int doStartTag() throws JspException {

        TagUtils.getInstance().write(pageContext, renderSelectStartElement());

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

        this.calculateMatchValues();

        return (EVAL_BODY_TAG);
    }

    /**
     * Create an appropriate select start element based on our parameters.
     * @throws JspException
     * @since Struts 1.1
     */
    protected String renderSelectStartElement() throws JspException {
        StringBuffer results = new StringBuffer("<select");
        
        prepareAttribute(results, "name", prepareName());
        prepareAttribute(results, "accesskey", getAccesskey());
        if (multiple != null) {
            results.append(" multiple=\"multiple\"");
        }
        prepareAttribute(results, "size", getSize());
        prepareAttribute(results, "tabindex", getTabindex());
        results.append(prepareEventHandlers());
        results.append(prepareStyles());
        prepareOtherAttributes(results);
        results.append(">");
        
        return results.toString();
    }

    /**
     * Calculate the match values we will actually be using.
     * @throws JspException
     */
    private void calculateMatchValues() throws JspException {
        if (this.value != null) {
            this.match = new String[1];
            this.match[0] = this.value;
            
        } else {
            Object bean = TagUtils.getInstance().lookup(pageContext, name, null);
            if (bean == null) {
                JspException e =
                    new JspException(messages.getMessage("getter.bean", name));
                    
                TagUtils.getInstance().saveException(pageContext, e);
                throw e;
            }

            try {
                this.match = BeanUtils.getArrayProperty(bean, property);
                if (this.match == null) {
                    this.match = new String[0];
                }

            } catch (IllegalAccessException e) {
                TagUtils.getInstance().saveException(pageContext, e);
                throw new JspException(
                    messages.getMessage("getter.access", property, name));

            } catch (InvocationTargetException e) {
                Throwable t = e.getTargetException();
                TagUtils.getInstance().saveException(pageContext, t);
                throw new JspException(
                    messages.getMessage("getter.result", property, t.toString()));

            } catch (NoSuchMethodException e) {
                TagUtils.getInstance().saveException(pageContext, e);
                throw new JspException(
                    messages.getMessage("getter.method", property, name));
            }
        }
    }


    /**
     * Save any body content of this tag, which will generally be the
     * option(s) representing the values displayed to the user.
     *
     * @exception JspException if a JSP exception has occurred
     */
    public int doAfterBody() throws JspException {

        if (bodyContent != null) {
            String value = bodyContent.getString();
            if (value == null) {
                value = "";
            }
            
            this.saveBody = value.trim();
        }
        
        return (SKIP_BODY);
    }


    /**
     * 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.SELECT_KEY);

        // Render a tag representing the end of our current form
        StringBuffer results = new StringBuffer();
        if (saveBody != null) {
            results.append(saveBody);
            saveBody = null;
        }
        results.append("</select>");

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

        return (EVAL_PAGE);
    }

    /**
     * Prepare the name element
     * @return The element name.
     */
    protected String prepareName() throws JspException {

        if (property == null) {
            return null;
        }

        // * @since Struts 1.1
        if(indexed) {
            StringBuffer results = new StringBuffer();
            prepareIndex(results, name);
            results.append(property);
            return results.toString();
        }

        return property;

    }

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

        super.release();
        match = null;
        multiple = null;
        name = Constants.BEAN_KEY;
        property = null;
        saveBody = null;
        size = null;
        value = null;

    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美一区二区三区鸳鸯浴| 日韩久久久久久| 91蝌蚪国产九色| 日本韩国精品一区二区在线观看| 99国产精品久久久久久久久久久 | 性久久久久久久久久久久| 亚洲伊人伊色伊影伊综合网| 首页亚洲欧美制服丝腿| 久久成人麻豆午夜电影| 极品少妇一区二区| www.亚洲人| 91精品国产综合久久小美女| 久久久久国产成人精品亚洲午夜 | 国产麻豆欧美日韩一区| 国产精品一区二区久激情瑜伽| 成人免费va视频| 欧美日韩一区二区三区高清 | 国产精品1024久久| 在线观看国产精品网站| 精品少妇一区二区三区| 亚洲欧美日韩中文字幕一区二区三区 | 亚洲欧洲美洲综合色网| 午夜电影网一区| 高清免费成人av| 日韩你懂的电影在线观看| 一区二区三区四区在线| 久久国产乱子精品免费女| 欧美性猛片xxxx免费看久爱| wwwwxxxxx欧美| 蜜桃av一区二区| 欧美精品777| 国产精品女主播av| 免费久久精品视频| 欧美二区乱c少妇| 亚洲已满18点击进入久久| 成人午夜电影网站| 久久久久久夜精品精品免费| 蜜桃视频在线观看一区| 欧美精品v国产精品v日韩精品| 亚洲一区二区三区四区的 | 国产精品网站在线| 国产精品123区| 26uuu色噜噜精品一区| 国内精品写真在线观看| 日韩欧美中文字幕精品| 免费三级欧美电影| 久久色.com| 国产成人一区二区精品非洲| 国产精品丝袜久久久久久app| 国产精品中文字幕欧美| 中文字幕乱码日本亚洲一区二区 | 国产情人综合久久777777| 国产一区二区三区国产| 国产精品免费av| 91 com成人网| 国产成人a级片| 亚洲影院久久精品| 亚洲精品一线二线三线| 色综合天天做天天爱| 婷婷开心激情综合| 中文字幕欧美区| 91.麻豆视频| 9色porny自拍视频一区二区| 亚洲第一电影网| 麻豆国产欧美日韩综合精品二区| 国产喷白浆一区二区三区| 一区二区三区四区国产精品| 国产夫妻精品视频| 天天综合色天天综合| 国产亚洲成年网址在线观看| 欧美三电影在线| 大胆亚洲人体视频| 一区二区三区欧美| 亚洲国产精品高清| 久久久久成人黄色影片| 日韩欧美成人午夜| 日韩午夜在线观看视频| 在线欧美日韩精品| 99re视频精品| 欧美在线一区二区三区| 91女神在线视频| 成人一区二区三区视频在线观看| 国内外精品视频| 国产乱子伦一区二区三区国色天香| 日本v片在线高清不卡在线观看| 亚洲国产日韩一区二区| 亚洲一区在线播放| 无吗不卡中文字幕| 午夜欧美一区二区三区在线播放| 亚洲电影视频在线| 日本大胆欧美人术艺术动态| 日本强好片久久久久久aaa| 丝袜美腿亚洲综合| 蜜桃在线一区二区三区| 国内欧美视频一区二区| 97精品超碰一区二区三区| 99久久精品免费| 欧美日韩成人综合天天影院| 欧美一级专区免费大片| 中文字幕免费一区| 亚洲福利视频三区| 国产一区二区三区av电影| 风间由美一区二区三区在线观看| 94-欧美-setu| 在线不卡一区二区| 欧美国产成人精品| 亚洲午夜免费视频| 国产jizzjizz一区二区| 在线观看国产日韩| 国产精品女人毛片| 日本在线不卡一区| 日本高清无吗v一区| 久久亚洲春色中文字幕久久久| 一区二区免费看| 国产精品综合一区二区| 欧美日韩精品欧美日韩精品| 久久综合一区二区| 日韩中文字幕91| 色综合久久66| 中文字幕在线免费不卡| 国产成人综合精品三级| 538prom精品视频线放| 午夜久久久久久久久久一区二区| 丁香六月综合激情| 国产精品区一区二区三区| 久久成人免费网站| 日韩精品中午字幕| 久久精品99国产精品日本| 欧美丝袜丝交足nylons| 亚洲欧美区自拍先锋| 99久久99久久综合| 中文字幕永久在线不卡| 国产原创一区二区三区| 精品成人一区二区| 国产成人啪午夜精品网站男同| 精品美女一区二区| 国产精品一区在线观看你懂的| 久久久久国产精品免费免费搜索| 国产乱人伦精品一区二区在线观看 | 蜜桃av一区二区三区| 日韩精品中午字幕| 国产91丝袜在线观看| 国产精品视频一二三区 | 国产精品成人免费精品自在线观看| 国产成人av影院| 一区二区理论电影在线观看| 欧美福利视频一区| 精品一区二区免费看| 国产精品视频一二三区| 欧美三区免费完整视频在线观看| 日韩精品成人一区二区三区| 精品国产免费人成电影在线观看四季| 韩国欧美国产1区| 亚洲最快最全在线视频| 日韩久久久久久| 色噜噜夜夜夜综合网| 久久99久久久久| 一区二区三区中文免费| 久久只精品国产| 欧美日韩国产区一| 97久久精品人人爽人人爽蜜臀| 日韩av电影一区| 亚洲三级电影网站| 欧美大度的电影原声| 欧美日韩一二区| 色综合久久久久| 成人综合在线观看| 黑人巨大精品欧美一区| 久久精品二区亚洲w码| 亚洲欧美一区二区三区久本道91 | 国模冰冰炮一区二区| 性感美女久久精品| 亚洲色图欧美在线| 国产精品久久精品日日| 中文一区一区三区高中清不卡| 26uuu精品一区二区| 欧美成人激情免费网| 日韩一级精品视频在线观看| 欧美日韩黄色一区二区| 欧美性淫爽ww久久久久无| 欧美在线短视频| 精品视频一区二区不卡| 欧美欧美欧美欧美| 欧美一区二区三区免费在线看| 欧美日韩一区三区四区| 欧美一级艳片视频免费观看| 欧美岛国在线观看| 久久久高清一区二区三区| 国产精品成人免费精品自在线观看| 国产精品拍天天在线| 亚洲免费观看在线观看| 亚洲国产精品天堂| 日本sm残虐另类| 91丨九色porny丨蝌蚪| 欧美亚洲高清一区| 久久久久久毛片| 亚洲综合激情另类小说区| 久久国产生活片100| 97精品久久久午夜一区二区三区 | 午夜精品福利久久久|