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

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

?? simpleformcontroller.java

?? spring framework 2.5.4源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Copyright 2002-2007 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 java.util.Map;

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

import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
import org.springframework.web.portlet.ModelAndView;

/**
 * <p>Concrete FormController implementation that provides configurable
 * form and success views, and an onSubmit chain for convenient overriding.
 * Automatically resubmits to the form view in case of validation errors,
 * and renders the success view in case of a valid submission.</p>
 *
 * <p>The workflow of this Controller does not differ much from the one described
 * in the {@link AbstractFormController AbstractFormController}. The difference
 * is that you do not need to implement {@link #showForm showForm},
 * {@link #processFormSubmission processFormSubmission}, and
 * {@link #renderFormSubmission renderFormSubmission}: A form view and a
 * success view can be configured declaratively.</p>
 *
 * <p>This controller is different from it's servlet counterpart in that it must take
 * into account the two phases of a portlet request: the action phase and the render
 * phase.  See the JSR-168 spec for more details on these two phases.
 * Be especially aware that the action phase is called only once, but that the
 * render phase will be called repeatedly by the portal -- it does this every time
 * the page containing the portlet is updated, even if the activity is in some other
 * portlet.  The main difference in the methods in this class is that the
 * <code>onSubmit</code> methods have all been split into <code>onSubmitAction</code>
 * and <code>onSubmitRender</code> to account for the two phases.</p>
 *
 * <p><b><a name="workflow">Workflow
 * (<a href="AbstractFormController.html#workflow">in addition to the superclass</a>):</b><br>
 * <ol>
 * <li>Call to {@link #processFormSubmission processFormSubmission} which inspects
 * the {@link org.springframework.validation.Errors Errors} object to see if
 * any errors have occurred during binding and validation.</li>
 * <li>If errors occured, the controller will return the configured formView,
 * showing the form again (possibly rendering according error messages).</li>
 * <li>If {@link #isFormChangeRequest isFormChangeRequest} is overridden and returns
 * true for the given request, the controller will return the formView too.
 * In that case, the controller will also suppress validation. Before returning the formView,
 * the controller will invoke {@link #onFormChange}, giving sub-classes a chance
 * to make modification to the command object.
 * This is intended for requests that change the structure of the form,
 * which should not cause validation and show the form in any case.</li>
 * <li>If no errors occurred, the controller will call
 * {@link #onSubmitAction(ActionRequest, ActionResponse, Object, BindException) onSubmitAction}
 * during the action phase and then {@link #onSubmitRender(RenderRequest, RenderResponse,
		* Object, BindException) onSubmitRender} during the render phase, which in case of the
 * default implementation delegate to {@link #onSubmitAction(Object, BindException)
 * onSubmitAction} and {@link #onSubmitRender(Object, BindException) onSubmitRender}
 * with just the command object.
 * The default implementation of the latter method will return the configured
 * <code>successView</code>. Consider just implementing {@link #doSubmitAction doSubmitAction}
 * for simply performing a submit action during the action phase and then rendering
 * the success view during the render phase.</li>
 * </ol>
 * </p>
 *
 * <p>The submit behavior can be customized by overriding one of the
 * {@link #onSubmitAction onSubmitAction} or {@link #onSubmitRender onSubmitRender}
 * methods. Submit actions can also perform custom validation if necessary
 * (typically database-driven checks), calling {@link #showForm(RenderRequest,
		* RenderResponse, BindException) showForm} in case of validation errors to show
 * the form view again.  You do not have to override both the <code>onSubmitAction</code> and
 * <code>onSubmitRender</code> methods at a given level unless you truly have custom logic to
 * perform in both.<p>
 *
 * <p><b>WARNING:</b> Make sure that any one-time system updates (such as database
 * updates or file writes) are performed in either an {@link #onSubmitAction onSubmitAction}
 * method or the {@link #doSubmitAction doSubmitAction} method.  Logic in the
 * {@link #onSubmitRender onSubmitRender} methods may be executed repeatedly by
 * the portal whenever the page containing the portlet is updated.</p>
 *
 * <p><b><a name="config">Exposed configuration properties</a>
 * (<a href="AbstractFormController.html#config">and those defined by superclass</a>):</b><br>
 * <table border="1">
 * <tr>
 * <td><b>name</b></td>
 * <td><b>default</b></td>
 * <td><b>description</b></td>
 * </tr>
 * <tr>
 * <td>formView</td>
 * <td><i>null</i></td>
 * <td>Indicates what view to use when the user asks for a new form
 * or when validation errors have occurred on form submission.</td>
 * </tr>
 * <tr>
 * <td>successView</td>
 * <td><i>null</i></td>
 * <td>Indicates what view to use when successful form submissions have
 * occurred. Such a success view could e.g. display a submission summary.
 * More sophisticated actions can be implemented by overriding one of
 * the {@link #onSubmitRender(Object) onSubmitRender()} methods.</td>
 * </tr>
 * <table>
 * </p>
 *
 * <p>Parameters indicated with <code>setPassRenderParameters</code> will be
 * preserved if the form has errors or if a form change request occurs.
 * If there are render parameters you need in <code>onSubmitRender</code>,
 * then you need to pass those forward from <code>onSubmitAction</code>.
 *
 * <p>Thanks to Rainer Schmitz and Nick Lothian for their suggestions!
 *
 * @author John A. Lewis
 * @author Juergen Hoeller
 * @author Rob Harrop
 * @since 2.0
 */
public class SimpleFormController extends AbstractFormController {

	private String formView;

	private String successView;


	/**
	 * Create a new SimpleFormController.
	 * <p>Subclasses should set the following properties, either in the constructor
	 * or via a BeanFactory: commandName, commandClass, sessionForm, formView,
	 * successView. Note that commandClass doesn't need to be set when overriding
	 * <code>formBackingObject</code>, as this determines the class anyway.
	 * @see #setCommandClass(Class)
	 * @see #setCommandName(String)
	 * @see #setSessionForm(boolean)
	 * @see #setFormView
	 * @see #setSuccessView
	 * @see #formBackingObject(PortletRequest)
	 */
	public SimpleFormController() {
		// AbstractFormController sets default cache seconds to 0.
		super();
	}

	/**
	 * Set the name of the view that should be used for form display.
	 */
	public final void setFormView(String formView) {
		this.formView = formView;
	}

	/**
	 * Return the name of the view that should be used for form display.
	 */
	public final String getFormView() {
		return this.formView;
	}

	/**
	 * Set the name of the view that should be shown on successful submit.
	 */
	public final void setSuccessView(String successView) {
		this.successView = successView;
	}

	/**
	 * Return the name of the view that should be shown on successful submit.
	 */
	public final String getSuccessView() {
		return this.successView;
	}


	/**
	 * This implementation shows the configured form view, delegating to the
	 * analogous showForm version with a controlModel argument.
	 * <p>Can be called within onSubmit implementations, to redirect back to the form
	 * in case of custom validation errors (i.e. not determined by the validator).
	 * <p>Can be overridden in subclasses to show a custom view, writing directly
	 * to the response or preparing the response before rendering a view.
	 * <p>If calling showForm with a custom control model in subclasses, it's preferable
	 * to override the analogous showForm version with a controlModel argument
	 * (which will handle both standard form showing and custom form showing then).
	 * @see #setFormView
	 * @see #showForm(RenderRequest, RenderResponse, BindException, Map)
	 */
	protected ModelAndView showForm(RenderRequest request, RenderResponse response, BindException errors)
			throws Exception {

		return showForm(request, response, errors, null);
	}

	/**
	 * This implementation shows the configured form view.
	 * <p>Can be called within onSubmit implementations, to redirect back to the form
	 * in case of custom validation errors (i.e. not determined by the validator).
	 * <p>Can be overridden in subclasses to show a custom view, writing directly
	 * to the response or preparing the response before rendering a view.
	 * @param request current render request
	 * @param errors validation errors holder
	 * @param controlModel model map containing controller-specific control data
	 * (e.g. current page in wizard-style controllers or special error message)
	 * @return the prepared form view
	 * @throws Exception in case of invalid state or arguments
	 * @see #setFormView
	 */
	protected ModelAndView showForm(RenderRequest request, RenderResponse response, BindException errors, Map controlModel)
			throws Exception {

		return showForm(request, errors, getFormView(), controlModel);
	}

	/**
	 * Create a reference data map for the given request and command,
	 * consisting of bean name/bean instance pairs as expected by ModelAndView.
	 * <p>Default implementation delegates to referenceData(request).
	 * Subclasses can override this to set reference data used in the view.
	 * @param request current portlet request
	 * @param command form object with request parameters bound onto it
	 * @param errors validation errors holder
	 * @return a Map with reference data entries, or null if none
	 * @throws Exception in case of invalid state or arguments
	 * @see ModelAndView
	 */
	protected Map referenceData(PortletRequest request, Object command, Errors errors) throws Exception {
		return referenceData(request);
	}

	/**
	 * Create a reference data map for the given request.
	 * Called by referenceData version with all parameters.
	 * <p>Default implementation returns null.
	 * Subclasses can override this to set reference data used in the view.
	 * @param request current portlet request
	 * @return a Map with reference data entries, or null if none
	 * @throws Exception in case of invalid state or arguments
	 * @see #referenceData(PortletRequest, Object, Errors)
	 * @see ModelAndView
	 */
	protected Map referenceData(PortletRequest request) throws Exception {
		return null;
	}


	/**
	 * This implementation calls <code>showForm</code> in case of errors,
	 * and delegates to <code>onSubmitRender<code>'s full version else.
	 * <p>This can only be overridden to check for an action that should be executed
	 * without respect to binding errors, like a cancel action. To just handle successful
	 * submissions without binding errors, override one of the <code>onSubmitRender</code>
	 * methods.
	 * @see #showForm(RenderRequest, RenderResponse, BindException)
	 * @see #onSubmitRender(RenderRequest, RenderResponse, Object, BindException)
	 * @see #onSubmitRender(Object, BindException)
	 * @see #onSubmitRender(Object)
	 * @see #processFormSubmission(ActionRequest, ActionResponse, Object, BindException)
	 */
	protected ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors)
			throws Exception {

		if (errors.hasErrors() || isFormChangeRequest(request)) {
			return showForm(request, response, errors);
		}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青草原综合久久大伊人精品| 在线亚洲一区二区| 久久国产精品99久久久久久老狼| 午夜视黄欧洲亚洲| 亚洲成a人v欧美综合天堂| 亚洲精品成人a在线观看| 亚洲免费资源在线播放| 一区二区三区免费看视频| 亚洲欧美日韩电影| 亚洲精品免费看| 性欧美疯狂xxxxbbbb| 午夜日韩在线观看| 免费欧美日韩国产三级电影| 久久国产生活片100| 加勒比av一区二区| 国产成人免费在线观看不卡| 国产不卡高清在线观看视频| 99精品久久久久久| 91国模大尺度私拍在线视频| 在线成人av网站| 日韩欧美在线一区二区三区| 337p日本欧洲亚洲大胆精品 | 国产精品人妖ts系列视频| 久久精品一二三| 国产精品久久久久9999吃药| 亚洲美女精品一区| 亚洲国产欧美在线人成| 美女一区二区三区在线观看| 国产盗摄一区二区| 色综合一个色综合| 欧美一区二区观看视频| 久久久久国产精品麻豆| 亚洲美女屁股眼交3| 全国精品久久少妇| 岛国精品在线播放| 欧洲视频一区二区| 欧美成人激情免费网| 中文字幕欧美一| 日一区二区三区| 高清免费成人av| 欧美视频完全免费看| 精品国产乱码久久久久久免费| 国产精品丝袜91| 日本中文字幕一区二区有限公司| 国产一区高清在线| 色播五月激情综合网| 欧美大片在线观看| 亚洲黄色小说网站| 国产乱理伦片在线观看夜一区| 91黄色免费看| 国产人成一区二区三区影院| 亚洲国产日韩精品| 粉嫩在线一区二区三区视频| 欧美精品免费视频| 一区精品在线播放| 精品亚洲国产成人av制服丝袜| 一本久道中文字幕精品亚洲嫩| 欧美第一区第二区| 亚洲一区二区三区中文字幕在线| 国产在线精品一区二区| 欧美影院一区二区| 国产精品久久久久三级| 蜜桃91丨九色丨蝌蚪91桃色| 色综合久久综合网| 欧美高清在线一区| 麻豆精品久久精品色综合| 色94色欧美sute亚洲线路一久| 国产色91在线| 麻豆国产精品一区二区三区| 色婷婷综合久久久久中文| 国产日韩欧美精品一区| 久久精品视频网| 日韩黄色在线观看| 91成人免费电影| 国产精品日韩成人| 国产精品456露脸| 福利91精品一区二区三区| 日韩欧美激情在线| 天堂成人免费av电影一区| 91福利社在线观看| 综合中文字幕亚洲| 风间由美性色一区二区三区| 精品少妇一区二区三区视频免付费| 亚洲国产综合人成综合网站| 91一区二区三区在线观看| 欧美激情一区二区在线| 久久99久国产精品黄毛片色诱| 欧美日韩激情在线| 亚洲综合成人在线视频| 日本精品一级二级| 亚洲美女一区二区三区| a级精品国产片在线观看| 国产视频一区在线观看| 国产精品成人在线观看| 成人午夜视频免费看| 国产亚洲一本大道中文在线| 国产呦萝稀缺另类资源| 26uuu另类欧美| 国产伦精品一区二区三区免费 | 久久精品一区二区三区不卡牛牛| 青青草国产精品亚洲专区无| 国产精品一区二区三区网站| 日韩美女视频一区二区在线观看| 国产欧美一区在线| 成人综合在线视频| 亚洲国产成人私人影院tom| 国产激情视频一区二区在线观看| 久久综合九色综合欧美就去吻 | 欧美色电影在线| 亚洲成a人v欧美综合天堂下载| 欧美另类一区二区三区| 日韩专区在线视频| 国产suv一区二区三区88区| 在线亚洲一区二区| 五月天亚洲精品| 日韩一区二区视频在线观看| 精品在线免费观看| 国产午夜精品一区二区| 成人激情电影免费在线观看| 综合色中文字幕| 一本一道久久a久久精品综合蜜臀| 一区二区三区在线观看国产| 欧美日韩一区国产| 伦理电影国产精品| 国产午夜亚洲精品理论片色戒 | 91精品国产色综合久久不卡蜜臀| 秋霞电影网一区二区| 亚洲精品一区二区三区精华液| 国产高清不卡二三区| 亚洲人成网站在线| 欧美日韩一区二区在线观看视频| 轻轻草成人在线| 国产日韩欧美制服另类| 日本二三区不卡| 久久se精品一区二区| 欧美自拍偷拍一区| 蜜桃精品视频在线| 麻豆成人av在线| 日本一区二区三区国色天香| 一本到一区二区三区| 奇米影视在线99精品| 国产日本一区二区| 在线免费不卡视频| 国产一区二三区| 一区二区欧美视频| 精品第一国产综合精品aⅴ| av午夜一区麻豆| 午夜视频在线观看一区二区三区| 91免费观看国产| 免费在线观看精品| 国产精品青草综合久久久久99| 欧美日韩国产综合久久| 国产盗摄精品一区二区三区在线| 亚洲一区二区综合| 久久久五月婷婷| 欧美亚洲一区二区在线观看| 韩日精品视频一区| 亚洲国产精品天堂| 久久精品一区二区| 91麻豆精品国产91久久久使用方法| 福利一区二区在线| 免费人成网站在线观看欧美高清| 欧美另类变人与禽xxxxx| 成人av网站免费观看| 日本中文字幕一区二区有限公司| 亚洲三级在线播放| 久久久99免费| 5月丁香婷婷综合| 色综合久久综合网| 国产a区久久久| 九九热在线视频观看这里只有精品| 亚洲美女淫视频| 国产精品视频一二| 精品日韩在线一区| 欧美日本一区二区三区| 99免费精品在线| 国产宾馆实践打屁股91| 美女www一区二区| 亚洲国产视频a| 亚洲图片欧美激情| 国产欧美久久久精品影院| 精品久久久久久最新网址| 在线观看中文字幕不卡| 成人国产精品免费观看视频| 另类的小说在线视频另类成人小视频在线 | 欧美日韩高清一区| av激情综合网| 国产激情91久久精品导航| 久久精品国产在热久久| 天天av天天翘天天综合网| 亚洲精品久久久蜜桃| 亚洲欧美日韩国产一区二区三区 | 国产在线精品一区在线观看麻豆| 一区二区三区精品在线观看| 国产精品亲子伦对白| 日本一区二区在线不卡| 欧美激情一区二区三区全黄| 久久久精品免费观看| 26uuu国产一区二区三区| 精品美女在线观看|