當前位置: 首頁>>代碼示例>>Java>>正文


Java ActionMapping.getMultipartClass方法代碼示例

本文整理匯總了Java中org.apache.struts.action.ActionMapping.getMultipartClass方法的典型用法代碼示例。如果您正苦於以下問題:Java ActionMapping.getMultipartClass方法的具體用法?Java ActionMapping.getMultipartClass怎麽用?Java ActionMapping.getMultipartClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.struts.action.ActionMapping的用法示例。


在下文中一共展示了ActionMapping.getMultipartClass方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: processPopulate

import org.apache.struts.action.ActionMapping; //導入方法依賴的package包/類
/**
 * <p>Populate the properties of the specified <code>ActionForm</code> instance from
 * the request parameters included with this request.  In addition,
 * request attribute <code>Globals.CANCEL_KEY</code> will be set if
 * the request was submitted with a button created by
 * <code>CancelTag</code>.</p>
 *
 * @param request The servlet request we are processing
 * @param response The servlet response we are creating
 * @param form The ActionForm instance we are populating
 * @param mapping The ActionMapping we are using
 *
 * @exception ServletException if thrown by RequestUtils.populate()
 */
protected void processPopulate(HttpServletRequest request, HttpServletResponse response,
        ActionForm form, ActionMapping mapping) throws ServletException {
    if (form == null)
        return;

    // Populate the bean properties of this ActionForm instance
    if (log.isDebugEnabled())
        log.debug(" Populating bean properties from this request");

    form.setServlet(this.servlet);

    //*** Jaffa-customization: Moved in the custom populate method ***
    //form.reset(mapping, request);

    if (mapping.getMultipartClass() != null)
        request.setAttribute(Globals.MULTIPART_KEY, mapping.getMultipartClass());

    //*** Jaffa-customization: Invoke a custom version of the RequestUtils.populate() method, which will invoke the reset() method ***
    //RequestUtils.populate(form, mapping.getPrefix(), mapping.getSuffix(), request);
    customRequestUtilsPopulate(form, mapping.getPrefix(), mapping.getSuffix(), request, mapping);

    // Set the cancellation request attribute if appropriate
    if ((request.getParameter(Constants.CANCEL_PROPERTY) != null) || (request.getParameter(Constants.CANCEL_PROPERTY_X) != null))
        request.setAttribute(Globals.CANCEL_KEY, Boolean.TRUE);
}
 
開發者ID:jaffa-projects,項目名稱:jaffa-framework,代碼行數:40,代碼來源:CustomRequestProcessor.java


注:本文中的org.apache.struts.action.ActionMapping.getMultipartClass方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。