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

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

?? abstractcommandcontroller.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * 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.mvc;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;

import org.springframework.validation.BindException;
import org.springframework.web.portlet.ModelAndView;
import org.springframework.web.portlet.bind.PortletRequestDataBinder;

/**
 * <p>Abstract base class for custom command controllers. Autopopulates a
 * command bean from the request. For command validation, a validator
 * (property inherited from BaseCommandController) can be used.</p>
 *
 * <p>This command controller should preferrable not be used to handle form
 * submission, because functionality for forms is more offered in more
 * detail by the {@link org.springframework.web.portlet.mvc.AbstractFormController
 * AbstractFormController} and its corresponding implementations.</p>
 *
 * <p><b><a name="config">Exposed configuration properties</a>
 * (<a href="BaseCommandController.html#config">and those defined by superclass</a>):</b><br>
 * <i>none</i> (so only those available in superclass).</p>
 *
 * <p><b><a name="workflow">Workflow
 * (<a name="BaseCommandController.html#workflow">and that defined by superclass</a>):</b><br>
 *
 * @author John A. Lewis
 * @author Juergen Hoeller
 * @since 2.0
 * @see #setCommandClass
 * @see #setCommandName
 * @see #setValidator
 */
public abstract class AbstractCommandController extends BaseCommandController {

	/**
	 * This render parameter is used to indicate forward to the render phase
	 * that a valid command (and errors) object is in the session.
	 */
	private static final String COMMAND_IN_SESSION_PARAMETER = "command-in-session";

	private static final String TRUE = Boolean.TRUE.toString();


	/**
	 * Create a new AbstractCommandController.
	 */
	public AbstractCommandController() {
	}

	/**
	 * Create a new AbstractCommandController.
	 * @param commandClass class of the command bean
	 */
	public AbstractCommandController(Class commandClass) {
		setCommandClass(commandClass);
	}

	/**
	 * Create a new AbstractCommandController.
	 * @param commandClass class of the command bean
	 * @param commandName name of the command bean
	 */
	public AbstractCommandController(Class commandClass, String commandName) {
		setCommandClass(commandClass);
		setCommandName(commandName);
	}


	protected final void handleActionRequestInternal(ActionRequest request, ActionResponse response)
			throws Exception {

		// Create the command object.
		Object command = getCommand(request);

		// Compute the errors object.
		PortletRequestDataBinder binder = bindAndValidate(request, command);
		BindException errors = new BindException(binder.getBindingResult());

		// Actually handle the action.
		handleAction(request, response, command, errors);

		// Pass the command and errors forward to the render phase.
		setRenderCommandAndErrors(request, command, errors);
		setCommandInSession(response);
	}

	protected final ModelAndView handleRenderRequestInternal(
			RenderRequest request, RenderResponse response) throws Exception {

		Object command = null;
		BindException errors = null;

		// get the command and errors objects from the session, if they exist
		if (isCommandInSession(request)) {
			logger.debug("Render phase obtaining command and errors objects from session");
			command = getRenderCommand(request);
			errors = getRenderErrors(request);
		}
		else {
			logger.debug("Render phase creating new command and errors objects");
		}

		// If no command object was in the session, create a new one.
		if (command == null) {
			command = getCommand(request);
		}

		// If no errors object was in the session, compute a new one.
		if (errors == null) {
			PortletRequestDataBinder binder = bindAndValidate(request, command);
			errors = new BindException(binder.getBindingResult());
		}

		return handleRender(request, response, command, errors);
	}


	/**
	 * Template method for request handling, providing a populated and validated instance
	 * of the command class, and an Errors object containing binding and validation errors.
	 * <p>Call <code>errors.getModel()</code> to populate the ModelAndView model
	 * with the command and the Errors instance, under the specified command name,
	 * as expected by the "spring:bind" tag.
	 * @param request current action request
	 * @param response current action response
	 * @param command the populated command object
	 * @param errors validation errors holder
	 * @see org.springframework.validation.Errors
	 * @see org.springframework.validation.BindException#getModel
	 */
	protected abstract void handleAction(
			ActionRequest request, ActionResponse response, Object command, BindException errors)
			throws Exception;

	/**
	 * Template method for render request handling, providing a populated and validated instance
	 * of the command class, and an Errors object containing binding and validation errors.
	 * <p>Call <code>errors.getModel()</code> to populate the ModelAndView model
	 * with the command and the Errors instance, under the specified command name,
	 * as expected by the "spring:bind" tag.
	 * @param request current render request
	 * @param response current render response
	 * @param command the populated command object
	 * @param errors validation errors holder
	 * @return a ModelAndView to render, or null if handled directly
	 * @see org.springframework.validation.Errors
	 * @see org.springframework.validation.BindException#getModel
	 */
	protected abstract ModelAndView handleRender(
			RenderRequest request, RenderResponse response, Object command, BindException errors)
			throws Exception;


	/**
	 * Return the name of the render parameter that indicates there
	 * is a valid command (and errors) object in the session.
	 * @return the name of the render parameter
	 * @see javax.portlet.RenderRequest#getParameter
	 */
	protected String getCommandInSessionParameterName() {
		return COMMAND_IN_SESSION_PARAMETER;
	}

	/**
	 * Set the action response parameter that indicates there is a
	 * command (and errors) object in the session for the render phase.
	 * @param response the current action response
	 * @see #getCommandInSessionParameterName
	 * @see #isCommandInSession
	 */
	protected final void setCommandInSession(ActionResponse response) {
		if (logger.isDebugEnabled()) {
			logger.debug("Setting render parameter [" + getCommandInSessionParameterName() +
					"] to indicate a valid command (and errors) object are in the session");
		}
		try {
			response.setRenderParameter(getCommandInSessionParameterName(), TRUE);
		}
		catch (IllegalStateException ex) {
			// Ignore in case sendRedirect was already set.
		}
	}

	/**
	 * Determine if there is a valid command (and errors) object in the
	 * session for this render request.
	 * @param request current render request
	 * @return if there is a valid command object in the session
	 * @see #getCommandInSessionParameterName
	 * @see #setCommandInSession
	 */
	protected final boolean isCommandInSession(RenderRequest request) {
		return TRUE.equals(request.getParameter(getCommandInSessionParameterName()));
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av在线资源| 7777精品伊人久久久大香线蕉经典版下载 | 精品人在线二区三区| 丝袜脚交一区二区| 欧美一区二区精品在线| 免费观看日韩av| 日韩午夜电影av| 国产乱码精品一区二区三| 国产偷国产偷亚洲高清人白洁| 九九**精品视频免费播放| www国产成人免费观看视频 深夜成人网| 国内一区二区在线| 国产精品理论在线观看| 波多野结衣在线一区| 亚洲色图色小说| 欧美三级电影网| 蜜臀久久久99精品久久久久久| 精品国产髙清在线看国产毛片| 国产成人aaaa| 亚洲丝袜美腿综合| 欧美亚洲动漫精品| 国产一区中文字幕| 国产精品美日韩| 欧美日韩欧美一区二区| 久久久久久一二三区| 成人免费视频caoporn| 1024成人网| 日韩一级高清毛片| 一区二区三区四区在线播放| 欧美精品日韩精品| 高潮精品一区videoshd| 亚洲一卡二卡三卡四卡五卡| 日韩一区二区视频在线观看| 成人福利视频网站| 天堂成人国产精品一区| 国产精品欧美一区喷水| 在线成人免费视频| 国产成人综合亚洲91猫咪| 精品婷婷伊人一区三区三| 国产揄拍国内精品对白| 亚洲午夜一区二区| 久久久久久久综合色一本| 欧美亚洲综合网| 国产成人无遮挡在线视频| 亚洲sss视频在线视频| 国产午夜精品一区二区| 欧美理论在线播放| 国产不卡在线视频| 欧美精品一区二区三区很污很色的 | www.欧美色图| 美女视频网站久久| 亚洲另类色综合网站| 精品国产青草久久久久福利| 色94色欧美sute亚洲13| 国产成人综合在线| 久久97超碰色| 日产欧产美韩系列久久99| 亚洲女厕所小便bbb| 久久精品在线免费观看| 欧美一级在线观看| 欧美色视频一区| av综合在线播放| 国产成人精品在线看| 美腿丝袜亚洲色图| 午夜av电影一区| 亚洲综合一区二区| 亚洲色图视频网站| 综合自拍亚洲综合图不卡区| 精品国产免费一区二区三区四区| 欧美精品xxxxbbbb| 欧美视频在线播放| 色老头久久综合| 91在线一区二区三区| av中文字幕在线不卡| 高清国产一区二区| 国产不卡一区视频| 风间由美一区二区三区在线观看| 精品一区二区日韩| 看电影不卡的网站| 极品尤物av久久免费看| 麻豆精品一区二区三区| 美女视频一区在线观看| 日韩精品欧美精品| 日本伊人午夜精品| 首页综合国产亚洲丝袜| 日韩av一级片| 精品一区二区精品| 国内精品第一页| 粉嫩在线一区二区三区视频| 成人小视频在线| 狠狠色狠狠色综合系列| 国产精品资源站在线| 国产精品69毛片高清亚洲| 丁香婷婷综合激情五月色| 亚洲欧洲国产日本综合| 中文字幕一区二区三区在线观看 | 国产精品影视网| 综合在线观看色| 亚洲精品自拍动漫在线| 亚洲一区二区精品视频| 免费观看成人鲁鲁鲁鲁鲁视频| 激情综合色综合久久| 懂色av一区二区三区免费观看| 91久久国产最好的精华液| 欧美无人高清视频在线观看| 欧美一区二区三区免费视频| 久久综合色鬼综合色| 亚洲人成亚洲人成在线观看图片 | 国产一区二区三区电影在线观看| 国产精品正在播放| 色综合久久88色综合天天免费| 在线亚洲人成电影网站色www| 欧美日韩国产成人在线免费| 精品日韩一区二区三区| 中文字幕+乱码+中文字幕一区| 一个色综合av| 久久电影国产免费久久电影| 不卡视频一二三| 欧美少妇xxx| 久久久久久久久久久电影| 亚洲丝袜制服诱惑| 免费高清在线一区| 91啪在线观看| 精品久久久久99| 亚洲综合色网站| 国产一区二区三区四区在线观看| 91丨porny丨国产入口| 日韩免费在线观看| 欧美激情在线一区二区三区| 亚洲女爱视频在线| 国产一区二区三区久久久| 欧美私模裸体表演在线观看| 久久久久国产精品厨房| 亚洲国产日韩a在线播放性色| 国产精品一区二区三区99| 欧美这里有精品| 久久免费美女视频| 天堂成人国产精品一区| 色哟哟欧美精品| 亚洲国产精品传媒在线观看| 免费欧美在线视频| 在线亚洲免费视频| 日韩毛片在线免费观看| 精品一区二区三区免费毛片爱| 欧美性猛片xxxx免费看久爱| 国产精品无人区| 看片网站欧美日韩| 5858s免费视频成人| 亚洲国产精品综合小说图片区| 不卡一区二区三区四区| 国产日产欧美一区| 狠狠色2019综合网| 欧美一区二区成人6969| 亚洲国产综合色| 色综合天天综合网国产成人综合天 | 亚洲人成网站影音先锋播放| 国产乱码精品1区2区3区| 日韩欧美国产一区二区在线播放| 亚洲夂夂婷婷色拍ww47| 一本色道**综合亚洲精品蜜桃冫| 久久久久久久久99精品| 国产一区 二区| xfplay精品久久| 久久狠狠亚洲综合| 91精品福利在线一区二区三区| 亚洲电影一区二区三区| 色婷婷精品大在线视频| 《视频一区视频二区| 99精品偷自拍| 亚洲免费高清视频在线| 色系网站成人免费| 亚洲日本在线观看| 99精品热视频| 亚洲日本护士毛茸茸| 91免费在线看| 亚洲人成7777| 欧美色综合网站| 青青青伊人色综合久久| 精品国产一区二区在线观看| 美女视频黄免费的久久| 久久久久久一二三区| 亚洲男人天堂av网| 在线一区二区视频| 日本中文字幕一区| 久久久久久久综合日本| 国产不卡免费视频| 日韩极品在线观看| 久久精品国产精品亚洲综合| 欧美电视剧在线观看完整版| 国产酒店精品激情| 中文字幕日韩一区二区| 在线免费一区三区| 美女视频黄 久久| 国产日韩欧美精品电影三级在线| www.成人在线| 亚洲国产va精品久久久不卡综合| 91精品国产综合久久福利软件| 麻豆国产91在线播放| 国产精品美女久久久久久久| 一本大道久久a久久综合婷婷|