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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? optionstag.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2008 the original author or authors.
 *
 * 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.springframework.web.servlet.tags.form;

import javax.servlet.jsp.JspException;

import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.support.BindStatus;
import org.springframework.web.util.TagUtils;

/**
 * Convenient tag that allows one to supply a collection of objects
 * that are to be rendered as '<code>option</code>' tags within a
 * '<code>select</code>' tag.
 * 
 * <p><i>Must</i> be used within a {@link SelectTag 'select' tag}.
 * 
 * @author Rob Harrop
 * @author Juergen Hoeller
 * @since 2.0
 */
public class OptionsTag extends AbstractHtmlElementTag {
	
	/**
	 * The {@link java.util.Collection}, {@link java.util.Map} or array of
	 * objects used to generate the inner '<code>option</code>' tags.
	 */
	private Object items;

	/**
	 * The name of the property mapped to the '<code>value</code>' attribute
	 * of the '<code>option</code>' tag.
	 */
	private String itemValue;

	/**
	 * The name of the property mapped to the inner text of the
	 * '<code>option</code>' tag.
	 */
	private String itemLabel;

	private String disabled;


	/**
	 * Set the {@link java.util.Collection}, {@link java.util.Map} or array
	 * of objects used to generate the inner '<code>option</code>' tags.
	 * <p>Required when wishing to render '<code>option</code>' tags from an
	 * array, {@link java.util.Collection} or {@link java.util.Map}.
	 * <p>Typically a runtime expression.
	 * @param items said items
	 */
	public void setItems(Object items) {
		this.items = items;
	}

	/**
	 * Get the {@link java.util.Collection}, {@link java.util.Map} or array
	 * of objects used to generate the inner '<code>option</code>' tags.
	 * <p>Typically a runtime expression.
	 */
	protected Object getItems() {
		return this.items;
	}

	/**
	 * Set the name of the property mapped to the '<code>value</code>'
	 * attribute of the '<code>option</code>' tag.
	 * <p>Required when wishing to render '<code>option</code>' tags from
	 * an array or {@link java.util.Collection}.
	 * <p>May be a runtime expression.
	 */
	public void setItemValue(String itemValue) {
		Assert.hasText(itemValue, "'itemValue' must not be empty");
		this.itemValue = itemValue;
	}

	/**
	 * Return the name of the property mapped to the '<code>value</code>'
	 * attribute of the '<code>option</code>' tag.
	 */
	protected String getItemValue() {
		return this.itemValue;
	}

	/**
	 * Set the name of the property mapped to the label (inner text) of the
	 * '<code>option</code>' tag.
	 * <p>May be a runtime expression.
	 */
	public void setItemLabel(String itemLabel) {
		Assert.hasText(itemLabel, "'itemLabel' must not be empty");
		this.itemLabel = itemLabel;
	}

	/**
	 * Get the name of the property mapped to the label (inner text) of the
	 * '<code>option</code>' tag.
	 * <p>May be a runtime expression.
	 */
	protected String getItemLabel() {
		return this.itemLabel;
	}

	/**
	 * Set the value of the '<code>disabled</code>' attribute.
	 * <p>May be a runtime expression.
	 * @param disabled the value of the '<code>disabled</code>' attribute
	 */
	public void setDisabled(String disabled) {
		this.disabled = disabled;
	}

	/**
	 * Get the value of the '<code>disabled</code>' attribute.
	 */
	protected String getDisabled() {
		return this.disabled;
	}

	/**
	 * Is the current HTML tag disabled?
	 * @return <code>true</code> if this tag is disabled
	 */
	protected boolean isDisabled() {
		return "true".equals(getDisabled());
	}


	protected int writeTagContent(TagWriter tagWriter) throws JspException {
		assertUnderSelectTag();
		Object items = getItems();
		Object itemsObject = (items instanceof String ? evaluate("items", (String) items) : items);
		if (itemsObject != null) {
			String itemValue = getItemValue();
			String itemLabel = getItemLabel();
			String valueProperty =
					(itemValue != null ? ObjectUtils.getDisplayString(evaluate("itemValue", itemValue)) : null);
			String labelProperty =
					(itemLabel != null ? ObjectUtils.getDisplayString(evaluate("itemLabel", itemLabel)) : null);
			OptionsWriter optionWriter = new OptionsWriter(itemsObject, valueProperty, labelProperty);
			optionWriter.writeOptions(tagWriter);
		}
		return SKIP_BODY;
	}

	/**
	 * Appends a counter to a specified id,
	 * since we're dealing with multiple HTML elements.
	 */
	protected String resolveId() throws JspException {
		Object id = evaluate("id", getId());
		if (id != null) {
			String idString = id.toString();
			return (StringUtils.hasText(idString) ? TagIdGenerator.nextId(idString, this.pageContext) : null);
		}
		return null;
	}

	private void assertUnderSelectTag() {
		TagUtils.assertHasAncestorOfType(this, SelectTag.class, "options", "select");
	}

	protected BindStatus getBindStatus() {
		return (BindStatus) this.pageContext.getAttribute(SelectTag.LIST_VALUE_PAGE_ATTRIBUTE);
	}


	/**
	 * Inner class that adapts OptionWriter for multiple options to be rendered.
	 */
	private class OptionsWriter extends OptionWriter {

		public OptionsWriter(Object optionSource, String valueProperty, String labelProperty) {
			super(optionSource, getBindStatus(), valueProperty, labelProperty, isHtmlEscape());
		}

		protected boolean isOptionDisabled() {
			return isDisabled();
		}

		protected void writeCommonAttributes(TagWriter tagWriter) throws JspException {
			writeOptionalAttribute(tagWriter, "id", resolveId());
			writeOptionalAttributes(tagWriter);
		}
	}

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品久久艾草纯爱| 91精品国产欧美日韩| 欧美国产精品专区| 国产白丝网站精品污在线入口| 久久精品综合网| 不卡高清视频专区| 亚洲永久精品大片| 在线播放一区二区三区| 看电视剧不卡顿的网站| 久久综合中文字幕| 99麻豆久久久国产精品免费| 亚洲一区二区三区四区在线免费观看 | 欧美伊人精品成人久久综合97 | 中文字幕日韩av资源站| 色94色欧美sute亚洲线路一久 | 亚洲色图制服诱惑| 欧美日韩国产一级片| 久久99久国产精品黄毛片色诱| 亚洲免费视频成人| 在线免费亚洲电影| 捆绑变态av一区二区三区| 国产精品视频一二三| 欧美午夜精品久久久| 国产综合色精品一区二区三区| 亚洲欧洲精品天堂一级| 欧美一区二区三区四区视频| 国产精品白丝av| 性做久久久久久久免费看| 久久久久久久久久久久久女国产乱 | 性做久久久久久| 国产无一区二区| 欧美精品日韩一区| 成人国产精品免费观看动漫| 天堂一区二区在线| 亚洲欧洲av一区二区三区久久| 91精品国产全国免费观看| 成人手机电影网| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲欧洲三级电影| 精品欧美乱码久久久久久1区2区| 在线亚洲免费视频| 国产成人精品亚洲日本在线桃色| 亚洲va国产天堂va久久en| 欧美国产丝袜视频| 精品国产一区二区三区忘忧草| 91久久精品一区二区| 国产精品综合二区| 蜜臀久久久99精品久久久久久| 亚洲综合色区另类av| 国产精品理论片| 久久久久久久久久久黄色| 欧美一级夜夜爽| 欧美日韩国产美| 精品国产91九色蝌蚪| 欧美日韩中文字幕精品| 91丨九色porny丨蝌蚪| 韩国欧美一区二区| 日产国产欧美视频一区精品| 亚洲靠逼com| 中文字幕中文乱码欧美一区二区| 欧美成人午夜电影| 欧美一级在线视频| 91麻豆精品国产91久久久久| 一本大道久久a久久综合| 99精品桃花视频在线观看| 成人久久18免费网站麻豆 | 国产成人精品免费一区二区| 奇米精品一区二区三区在线观看一| 亚洲资源中文字幕| 亚洲精品免费在线| 亚洲欧美日韩中文播放| 中文字幕成人av| 国产精品全国免费观看高清| 国产免费久久精品| 久久精品视频一区二区三区| 久久青草国产手机看片福利盒子| 久久综合色综合88| 久久综合色之久久综合| 久久这里只精品最新地址| 久久蜜桃香蕉精品一区二区三区| 久久综合九色综合欧美98| 久久久久亚洲蜜桃| 国产欧美一区二区在线| 国产欧美日韩另类视频免费观看| 国产欧美日韩不卡免费| 日本一区二区视频在线| 国产精品久久午夜夜伦鲁鲁| 亚洲色图.com| 亚洲成人黄色影院| 蜜臀av一区二区在线免费观看| 精品综合免费视频观看| 国产精品一品视频| 成人网男人的天堂| 欧洲一区在线电影| 欧美精品一二三四| 2020国产精品| 自拍av一区二区三区| 亚洲自拍偷拍av| 久久精品av麻豆的观看方式| 国产精品亚洲一区二区三区妖精| 成人av午夜电影| 欧美日韩在线精品一区二区三区激情| 欧美久久久影院| 久久香蕉国产线看观看99| 性久久久久久久久| 国产乱码字幕精品高清av| 99精品国产热久久91蜜凸| 在线播放91灌醉迷j高跟美女 | 亚洲欧洲成人av每日更新| 亚洲国产aⅴ成人精品无吗| 另类成人小视频在线| 成人黄色在线网站| 欧美精品一二三| 国产拍欧美日韩视频二区| 一区二区欧美精品| 精品无人区卡一卡二卡三乱码免费卡| av电影在线不卡| 日韩免费在线观看| 亚洲欧美韩国综合色| 蜜桃免费网站一区二区三区| 91丨porny丨国产入口| 欧美一区二区三区小说| 国产精品美女久久久久aⅴ | 亚洲蜜臀av乱码久久精品蜜桃| 无码av中文一区二区三区桃花岛| 国产成人午夜精品5599| 欧美日韩国产片| 亚洲色图视频免费播放| 精品一区二区三区日韩| 91国产丝袜在线播放| 国产拍欧美日韩视频二区| 天天影视网天天综合色在线播放| 粉嫩高潮美女一区二区三区| 欧美精品三级在线观看| 国产精品国产自产拍在线| 精品午夜一区二区三区在线观看| 欧美在线播放高清精品| 中文字幕电影一区| 精品一区二区免费看| 欧美色电影在线| 成人免费小视频| 国产风韵犹存在线视精品| 欧美一级搡bbbb搡bbbb| 夜夜爽夜夜爽精品视频| kk眼镜猥琐国模调教系列一区二区| 日韩亚洲欧美一区| 亚洲国产精品久久久久秋霞影院 | 欧美亚洲愉拍一区二区| 国产欧美视频一区二区三区| 精品一区二区三区久久| 国产精品理论片| 国产精品亚洲а∨天堂免在线| 欧美一区国产二区| 午夜精品久久久久影视| 日本二三区不卡| 综合色中文字幕| 99视频在线精品| 一区在线观看免费| aaa国产一区| 国产精品久久久久婷婷| 国产成人av网站| 2020国产精品久久精品美国| 激情丁香综合五月| 欧美精品一区二区三区蜜桃视频| 图片区小说区区亚洲影院| 欧美日韩亚洲综合在线| 性久久久久久久久| 在线成人免费观看| 男女性色大片免费观看一区二区 | 色一情一伦一子一伦一区| 亚洲品质自拍视频| 91麻豆免费看片| 亚洲女同女同女同女同女同69| 99热在这里有精品免费| 亚洲欧美日韩系列| 在线免费观看日本欧美| 亚洲一区二区三区四区的| 欧美系列在线观看| 午夜精品久久久| 日韩欧美资源站| 国产一区二区伦理| 久久久久久久综合日本| 成人h版在线观看| 亚洲永久免费av| 日韩午夜在线观看| 国产原创一区二区| 国产精品久久毛片av大全日韩| 91香蕉视频mp4| 日精品一区二区三区| 欧美大度的电影原声| 国产成人在线观看| 一区二区三区四区高清精品免费观看 | 国产精品白丝jk黑袜喷水| 国产精品拍天天在线| 欧美色窝79yyyycom| 久久aⅴ国产欧美74aaa| 欧美激情一区二区三区不卡| 91精品福利在线| 理论片日本一区| 亚洲三级电影全部在线观看高清|