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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? modelandview.java

?? spring framework 2.5.4源代碼
?? JAVA
字號(hào):
/*
 * Copyright 2002-2006 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.portlet;

import java.util.Map;

import org.springframework.ui.ModelMap;

/**
 * Holder for both Model and View in the web MVC framework.
 * Note that these are entirely distinct. This class merely holds
 * both to make it possible for a controller to return both model
 * and view in a single return value.
 *
 * <p>Represents a model and view returned by a handler, to be resolved
 * by a DispatcherPortlet. The view can take the form of a String
 * view name which will need to be resolved by a ViewResolver object;
 * alternatively a view object can be specified directly. The model
 * is a Map, allowing the use of multiple objects keyed by name.
 *
 * @author Juergen Hoeller
 * @since 2.0
 * @see org.springframework.web.portlet.DispatcherPortlet
 * @see org.springframework.web.servlet.ViewResolver
 * @see org.springframework.web.portlet.HandlerAdapter
 * @see org.springframework.web.portlet.mvc.Controller
 */
public class ModelAndView {

	/** View instance or view name String */
	private Object view;

	/** Model Map */
	private ModelMap model;

	/**
	 * Indicates whether or not this instance has been cleared with a call to {@link #clear()}.
	 */
	private boolean cleared;


	/**
	 * Default constructor for bean-style usage: populating bean
	 * properties instead of passing in constructor arguments.
	 * @see #setView(Object)
	 * @see #setViewName(String)
	 */
	public ModelAndView() {
	}

	/**
	 * Convenient constructor when there is no model data to expose.
	 * Can also be used in conjunction with <code>addObject</code>.
	 * @param viewName name of the View to render, to be resolved
	 * by the DispatcherPortlet's ViewResolver
	 * @see #addObject
	 */
	public ModelAndView(String viewName) {
		this.view = viewName;
	}

	/**
	 * Convenient constructor when there is no model data to expose.
	 * Can also be used in conjunction with <code>addObject</code>.
	 * @param view View object to render (usually a Servlet MVC View object)
	 * @see #addObject
	 */
	public ModelAndView(Object view) {
		this.view = view;
	}

	/**
	 * Create a new ModelAndView given a view name and a model.
	 * @param viewName name of the View to render, to be resolved
	 * by the DispatcherPortlet's ViewResolver
	 * @param model Map of model names (Strings) to model objects
	 * (Objects). Model entries may not be <code>null</code>, but the
	 * model Map may be <code>null</code> if there is no model data.
	 */
	public ModelAndView(String viewName, Map model) {
		this.view = viewName;
		if (model != null) {
			getModelMap().addAllAttributes(model);
		}
	}

	/**
	 * Create a new ModelAndView given a View object and a model.
	 * @param view View object to render (usually a Servlet MVC View object)
	 * @param model Map of model names (Strings) to model objects
	 * (Objects). Model entries may not be <code>null</code>, but the
	 * model Map may be <code>null</code> if there is no model data.
	 */
	public ModelAndView(Object view, Map model) {
		this.view = view;
		if (model != null) {
			getModelMap().addAllAttributes(model);
		}
	}

	/**
	 * Convenient constructor to take a single model object.
	 * @param viewName name of the View to render, to be resolved
	 * by the DispatcherPortlet's ViewResolver
	 * @param modelName name of the single entry in the model
	 * @param modelObject the single model object
	 */
	public ModelAndView(String viewName, String modelName, Object modelObject) {
		this.view = viewName;
		addObject(modelName, modelObject);
	}

	/**
	 * Convenient constructor to take a single model object.
	 * @param view View object to render (usually a Servlet MVC View object)
	 * @param modelName name of the single entry in the model
	 * @param modelObject the single model object
	 */
	public ModelAndView(Object view, String modelName, Object modelObject) {
		this.view = view;
		addObject(modelName, modelObject);
	}


	/**
	 * Set a view name for this ModelAndView, to be resolved by the
	 * DispatcherPortlet via a ViewResolver. Will override any
	 * pre-existing view name or View.
	 */
	public void setViewName(String viewName) {
		this.view = viewName;
	}

	/**
	 * Return the view name to be resolved by the DispatcherPortlet
	 * via a ViewResolver, or <code>null</code> if we are using a view object.
	 */
	public String getViewName() {
		return (this.view instanceof String ? (String) this.view : null);
	}

	/**
	 * Set a View object for this ModelAndView. Will override any
	 * pre-existing view name or View.
	 * <p>The given View object will usually be a Servlet MVC View object.
	 * This is nevertheless typed as Object to avoid a Servlet API dependency
	 * in the Portlet ModelAndView class.
	 */
	public void setView(Object view) {
		this.view = view;
	}

	/**
	 * Return the View object, or <code>null</code> if we are using a view name
	 * to be resolved by the DispatcherPortlet via a ViewResolver.
	 */
	public Object getView() {
		return (!(this.view instanceof String) ? this.view : null);
	}

	/**
	 * Indicate whether or not this <code>ModelAndView</code> has a view, either
	 * as a view name or as a direct view instance.
	 */
	public boolean hasView() {
		return (this.view != null);
	}

	/**
	 * Return whether we use a view reference, i.e. <code>true</code>
	 * if the view has been specified via a name to be resolved by the
	 * DispatcherPortlet via a ViewResolver.
	 */
	public boolean isReference() {
		return (this.view instanceof String);
	}

	/**
	 * Return the model map. May return <code>null</code>.
	 * Called by DispatcherPortlet for evaluation of the model.
	 */
	protected Map getModelInternal() {
		return this.model;
	}

	/**
	 * Return the underlying <code>ModelMap</code> instance (never <code>null</code>).
	 */
	public ModelMap getModelMap() {
		if (this.model == null) {
			this.model = new ModelMap();
		}
		return this.model;
	}

	/**
	 * Return the model map. Never returns <code>null</code>.
	 * To be called by application code for modifying the model.
	 */
	public Map getModel() {
		return getModelMap();
	}


	/**
	 * Add an attribute to the model.
	 * @param attributeName name of the object to add to the model
	 * @param attributeValue object to add to the model (never <code>null</code>)
	 * @see ModelMap#addAttribute(String, Object)
	 * @see #getModelMap()
	 */
	public ModelAndView addObject(String attributeName, Object attributeValue) {
		getModelMap().addAttribute(attributeName, attributeValue);
		return this;
	}

	/**
	 * Add an attribute to the model using parameter name generation.
	 * @param attributeValue the object to add to the model (never <code>null</code>)
	 * @see ModelMap#addAttribute(Object)
	 * @see #getModelMap()
	 */
	public ModelAndView addObject(Object attributeValue) {
		getModelMap().addAttribute(attributeValue);
		return this;
	}

	/**
	 * Add all attributes contained in the provided Map to the model.
	 * @param modelMap a Map of attributeName -> attributeValue pairs
	 * @see ModelMap#addAllAttributes(Map)
	 * @see #getModelMap()
	 */
	public ModelAndView addAllObjects(Map modelMap) {
		getModelMap().addAllAttributes(modelMap);
		return this;
	}


	/**
	 * Clear the state of this ModelAndView object.
	 * The object will be empty afterwards.
	 * <p>Can be used to suppress rendering of a given ModelAndView object
	 * in the <code>postHandleRender</code> method of a HandlerInterceptor.
	 * @see #isEmpty()
	 * @see HandlerInterceptor#postHandleRender
	 */
	public void clear() {
		this.view = null;
		this.model = null;
		this.cleared = true;
	}

	/**
	 * Return whether this ModelAndView object is empty
	 * i.e. whether it does not hold any view and does not contain a model.
	 */
	public boolean isEmpty() {
		return (this.view == null && this.model == null);
	}

	/**
	 * Return whether this ModelAndView object is empty as a result of a call to {@link #clear}
	 * i.e. whether it does not hold any view and does not contain a model.
	 * Returns <code>false</code> if any additional state was added to the instance
	 * <strong>after</strong> the call to {@link #clear}.
	 * @see #clear()
	 */
	public boolean wasCleared() {
		return (this.cleared && isEmpty());
	}


	/**
	 * Return diagnostic information about this model and view.
	 */
	public String toString() {
		StringBuffer buf = new StringBuffer("ModelAndView: ");
		if (isReference()) {
			buf.append("reference to view with name '").append(this.view).append("'");
		}
		else {
			buf.append("materialized View is [").append(this.view).append(']');
		}
		buf.append("; model is ").append(this.model);
		return buf.toString();
	}

}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级日韩三级| 91麻豆精品国产91久久久使用方法| 欧美日韩黄色一区二区| 中文字幕精品三区| 蜜桃视频第一区免费观看| 欧美日韩电影一区| 亚洲另类一区二区| 欧美国产日韩精品免费观看| 国内精品嫩模私拍在线| 欧美午夜视频网站| 亚洲男人的天堂网| 亚洲国产成人av好男人在线观看| 欧美一区二区成人6969| 秋霞影院一区二区| 欧美人与z0zoxxxx视频| 免费av成人在线| 日本午夜精品视频在线观看| 欧美一区二区三区免费在线看| 亚洲国产成人av好男人在线观看| 亚洲丝袜另类动漫二区| 日韩不卡免费视频| 国产成人一区二区精品非洲| 欧美一区二区播放| 成人av资源站| 六月丁香综合在线视频| 日本一区二区三区视频视频| 日韩福利视频导航| 精品国产麻豆免费人成网站| 亚洲成人激情自拍| 一区二区三区中文在线观看| 精品一区二区三区视频在线观看| av动漫一区二区| 欧美一区国产二区| 最近日韩中文字幕| 久久国产免费看| 91麻豆国产香蕉久久精品| 日韩免费观看2025年上映的电影 | caoporen国产精品视频| 91麻豆精品国产91久久久资源速度| 日韩精品最新网址| 亚洲国产视频a| 日韩欧美一二区| 国产福利91精品一区二区三区| 久久亚区不卡日本| 欧美韩国日本综合| 日本亚洲最大的色成网站www| 不卡视频免费播放| 欧美精品一区二区三区视频| 亚洲国产欧美日韩另类综合| av在线免费不卡| 蜜桃视频第一区免费观看| 欧美一个色资源| 中文字幕欧美区| 秋霞午夜av一区二区三区| 国产白丝网站精品污在线入口| 一区二区三区波多野结衣在线观看| 国产夫妻精品视频| 国产精品久久综合| 91精品国产综合久久福利| 亚洲精品国产无天堂网2021| 国产伦精品一区二区三区免费| 精品区一区二区| 五月婷婷久久丁香| 欧美日韩国产片| 亚洲精品国产无天堂网2021| 99在线视频精品| 国产午夜久久久久| 成人中文字幕在线| 亚洲国产成人午夜在线一区| 国产精品一区二区三区99| 精品国产一区二区精华| 毛片不卡一区二区| 日韩一级二级三级| 日韩av二区在线播放| 91精品国产综合久久久久| 欧美色综合影院| 色综合久久久久| av在线一区二区三区| 久久久不卡网国产精品一区| 国产精品国产自产拍在线| 99久久精品一区二区| 国产成人久久精品77777最新版本| 成人免费视频网站在线观看| 成人h精品动漫一区二区三区| 欧美伊人久久大香线蕉综合69| 欧美亚日韩国产aⅴ精品中极品| 欧美一区二区三区免费| 欧美视频一二三区| 一区二区三区av电影| 日韩国产欧美视频| 亚洲一区二区视频在线观看| 国产三区在线成人av| 九九精品视频在线看| 91在线国产观看| 91精品国产91综合久久蜜臀| 奇米一区二区三区av| 国产精品国产三级国产专播品爱网| 国产嫩草影院久久久久| a级精品国产片在线观看| 一区二区三区四区蜜桃| 精品在线播放免费| 欧美性生活大片视频| 欧美性xxxxxx少妇| 精品少妇一区二区三区在线播放| 国产成人综合亚洲91猫咪| 国产乱国产乱300精品| 丰满白嫩尤物一区二区| 在线看日韩精品电影| 一本色道亚洲精品aⅴ| 精品日韩成人av| 亚洲国产成人私人影院tom| 日韩精品中文字幕一区| 久久婷婷国产综合精品青草| 亚洲日本青草视频在线怡红院| 国产精品久久久久久久久图文区 | 中文字幕二三区不卡| 欧美精品乱人伦久久久久久| 亚洲精品va在线观看| 欧美影视一区二区三区| 99re成人精品视频| 国产精品资源在线看| 欧美在线观看一区| 91欧美激情一区二区三区成人| 一区二区三区四区蜜桃 | 日韩电影在线观看网站| 国产精品美女久久久久高潮| 亚洲二区在线视频| 日韩伦理av电影| 国产亚洲精品7777| 日韩欧美在线网站| 日韩欧美不卡一区| 欧美精品乱码久久久久久| 国产亚洲午夜高清国产拍精品| 亚洲四区在线观看| 亚洲成av人片在www色猫咪| 国产精品国产精品国产专区不片| 日韩一区二区三区视频在线观看| 韩国女主播成人在线观看| 日韩欧美一区电影| 蜜臀av性久久久久蜜臀aⅴ流畅 | 亚洲午夜羞羞片| 亚洲一区二区视频| 亚洲免费毛片网站| 亚洲色图在线看| 99九九99九九九视频精品| 欧美中文字幕不卡| 五月婷婷综合激情| 91丨九色porny丨蝌蚪| 欧美在线免费播放| 日产国产高清一区二区三区| 男人的天堂久久精品| 欧美视频中文字幕| 亚洲人快播电影网| 亚洲女女做受ⅹxx高潮| 国产精品女人毛片| 奇米影视一区二区三区| 色噜噜狠狠一区二区三区果冻| 欧美图区在线视频| 一区二区激情小说| 欧美中文字幕不卡| 国产毛片精品一区| 国产精品色眯眯| 91精品国产91热久久久做人人| 亚洲精品国产精华液| 欧美成人精品福利| 亚洲成人av一区| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日韩福利电影在线| 精品福利二区三区| 99久久精品国产网站| 久久精品国产精品亚洲红杏| 制服视频三区第一页精品| 国产成人福利片| 波多野结衣中文字幕一区| 久草在线在线精品观看| 国产酒店精品激情| 9i看片成人免费高清| 7777精品伊人久久久大香线蕉的| 久久成人免费网站| 欧美人妇做爰xxxⅹ性高电影| 日韩精品一区二区三区视频 | 欧美日韩国产成人在线免费| 国产精品一二三| 国产精品欧美一区二区三区| 亚洲国产精品久久久男人的天堂| 中文字幕一区二区视频| 午夜成人在线视频| 久久99国产精品久久99果冻传媒| 欧美日韩在线不卡| 91麻豆swag| 色综合久久中文字幕| 亚洲一区二区三区视频在线| 国产一区二区在线看| 亚洲国产精品自拍| 3d动漫精品啪啪1区2区免费| 久久精品日产第一区二区三区高清版| 亚洲成人综合在线| 成人精品视频.| 欧美亚州韩日在线看免费版国语版| 一区二区三区精品在线观看|