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

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

?? actionlistenerimpl.java

?? struts的源代碼
?? JAVA
字號:
/*
 * Copyright 2002,2004 The Apache Software Foundation.
 * 
 * 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.apache.struts.faces.application;


import javax.faces.component.ActionSource;
import javax.faces.component.UIComponent;
import javax.faces.component.UIForm;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.Globals;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.RequestProcessor;
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.faces.Constants;
import org.apache.struts.faces.component.FormComponent;
import org.apache.struts.util.RequestUtils;


/**
 * <p>Concrete implementation of <code>ActionListener</code> that replaces
 * the default provided implementation.  It converts application-level events
 * into execution of the corresponding Struts request processing lifecycle.
 * </p>
 *
 * @version $Rev: 54934 $ $Date: 2004-10-16 18:07:50 +0100 (Sat, 16 Oct 2004) $
 */

public final class ActionListenerImpl implements ActionListener {


    // ------------------------------------------------------------ Constructors


    /**
     * <p>Construct a new default <code>ActionListener</code> instance,
     * passing it the previously configured one.</p>
     *
     * @param original Original default <code>ActionListener</code>
     *
     * @exception NullPointerException if <code>original</code>
     *  is <code>null</code>
     */
    public ActionListenerImpl(ActionListener original) {

        if (original == null) {
            throw new NullPointerException();
        }
        this.original = original;
        if (log.isInfoEnabled()) {
            log.info("Create ActionListener wrapping instance of type '" +
                     original.getClass().getName() + "'");
        }

    }



    // ------------------------------------------------------ Instance Variables


    /**
     * <p>The logger for this instance.</p>
     */
    private static final Log log = LogFactory.getLog(ActionListenerImpl.class);


    /**
     * <p>The previously configured <code>ActionListener</code> instance.</p>
     */
    private ActionListener original;


    // ---------------------------------------------------------- Public Methods


    /**
     * <p>Process the specified <code>ActionEvent</code>.</p>
     *
     * @param event The <code>ActionEvent</code> to be processed
     *
     * @exception AbortProcessingException to signal that no further
     *  event processing should be performed
     */
    public void processAction(ActionEvent event)
        throws AbortProcessingException {

        // If this is an immediate action, or we are NOT nested in a
        // Struts form, perform the standard processing
        UIComponent component = event.getComponent();
        ActionSource source = (ActionSource) component;
        boolean standard = source.isImmediate();
        if (!standard) {
            UIComponent parent = component.getParent();
            while (parent != null) {
                if (parent instanceof UIForm) {
                    if (!(parent instanceof FormComponent)) {
                        standard = true;
                    }
                    break;
                }
                parent = parent.getParent();
            }
        }
        if (standard) {
            if (log.isDebugEnabled()) {
                log.debug("Performing standard handling for event " +
                          "from source component '" + component.getId() + "'");
            }
            original.processAction(event);
            return;
        }


        // Acquire Servlet API Object References
        FacesContext context = FacesContext.getCurrentInstance();
        ServletContext servletContext = (ServletContext)
            context.getExternalContext().getContext();
        HttpServletRequest request = (HttpServletRequest)
            context.getExternalContext().getRequest();
        HttpServletResponse response = (HttpServletResponse)
            context.getExternalContext().getResponse();

        // Log this event if requested
        if (log.isDebugEnabled()) {
            log.debug("Performing Struts form submit for event " +
                      " from source component '" +
                      component.getId() + "'");
        }

        // Invoke the appropriate request processor for this request
        try {
            request.setAttribute(Constants.ACTION_EVENT_KEY, event);
            RequestUtils.selectModule(request, servletContext);
            ModuleConfig moduleConfig = (ModuleConfig)
                request.getAttribute(Globals.MODULE_KEY);
            if (log.isTraceEnabled()) {
                log.trace("Assigned to module with prefix '" +
                          moduleConfig.getPrefix() + "'");
            }
            RequestProcessor processor =
                getRequestProcessor(moduleConfig, servletContext);
            if (log.isTraceEnabled()) {
                log.trace("Invoking request processor instance " + processor);
            }
            processor.process(request, response);
            context.responseComplete();
        } catch (Exception e) {
            log.error("Exception processing action event " + event, e);
        } finally {
            request.removeAttribute(Constants.ACTION_EVENT_KEY);
        }

    }


    // ------------------------------------------------------ Protected Methods


    /**
     * <p>Look up and return the <code>RequestProcessor</code> responsible for
     * the specified module, creating a new one if necessary.  This method is
     * based on the corresponding code in <code>ActionServlet</code>, which
     * cannot be used directly because it is a protected method.</p>
     *
     * @param config The module configuration for which to
     *  acquire and return a RequestProcessor
     * @param context The <code>ServletContext</code> instance
     *  for this web application
     *
     * @exception IllegalStateException if we cannot instantiate a
     *  RequestProcessor instance
     */
    protected RequestProcessor getRequestProcessor(ModuleConfig config,
                                                   ServletContext context) {
            
        String key = Globals.REQUEST_PROCESSOR_KEY + config.getPrefix();
        RequestProcessor processor =
            (RequestProcessor) context.getAttribute(key);
            
        if (processor == null) {
            try {
                if (log.isDebugEnabled()) {
                    log.debug("Instantiating RequestProcessor of class " +
                              config.getControllerConfig().getProcessorClass());
                }
                ActionServlet servlet = (ActionServlet)
                context.getAttribute(Globals.ACTION_SERVLET_KEY);
                processor =
                    (RequestProcessor) RequestUtils.applicationInstance(
                        config.getControllerConfig().getProcessorClass());
                processor.init(servlet, config);
                context.setAttribute(key, processor);
            } catch (Exception e) {
                log.error("Cannot instantiate RequestProcessor of class "
                          + config.getControllerConfig().getProcessorClass(),
                          e);
                throw new IllegalStateException(
                    "Cannot initialize RequestProcessor of class "
                        + config.getControllerConfig().getProcessorClass()
                        + ": "
                        + e);
            }

        }
        return (processor);

    }
    

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲激情网站免费观看| 精品sm在线观看| 亚洲精品中文字幕乱码三区| 91视频精品在这里| 中文字幕亚洲成人| 色综合久久久久| 亚洲成av人在线观看| 欧美一区二区性放荡片| 精品一区二区三区不卡| 国产视频在线观看一区二区三区 | 久久久99精品免费观看不卡| 国产福利精品导航| 国产精品狼人久久影院观看方式| 91污片在线观看| 亚洲国产另类av| 欧美sm极限捆绑bd| 成人黄色国产精品网站大全在线免费观看 | 日韩欧美精品三级| 国产乱色国产精品免费视频| 国产精品国产三级国产aⅴ原创| 色视频一区二区| 免费在线观看日韩欧美| 国产精品美女一区二区| 欧美亚洲动漫另类| 国产一区二区在线视频| 1区2区3区精品视频| 欧美高清性hdvideosex| 成人自拍视频在线观看| 性久久久久久久久久久久| 欧美精品一区二区久久婷婷| 日本高清不卡视频| 国内外成人在线视频| 亚洲欧美aⅴ...| 精品久久久久久久久久久久久久久 | 日韩av网站免费在线| 久久精品在线免费观看| 欧美丝袜丝nylons| 国产精品亚洲第一区在线暖暖韩国| 亚洲美女在线国产| 久久一二三国产| 欧美精品一二三四| 9久草视频在线视频精品| 日韩av午夜在线观看| 亚洲伦在线观看| 精品久久久久久无| 欧美日韩高清不卡| 91浏览器打开| 成人网男人的天堂| 麻豆精品视频在线| 亚洲高清免费视频| 自拍偷拍国产精品| 久久青草国产手机看片福利盒子| 3atv一区二区三区| 色婷婷激情综合| 99视频一区二区| 国产成人精品影视| 久久er精品视频| 日本大胆欧美人术艺术动态| 亚洲曰韩产成在线| 亚洲人成人一区二区在线观看| 国产午夜精品久久| 欧美精品一区二区久久婷婷| 91精品国产麻豆| 欧美伊人久久久久久午夜久久久久| 成人激情av网| 成人18视频日本| 国产xxx精品视频大全| 狠狠色狠狠色综合| 蜜臀精品一区二区三区在线观看| 亚洲亚洲人成综合网络| 亚洲精品免费在线播放| 中文一区一区三区高中清不卡| xvideos.蜜桃一区二区| 久久欧美中文字幕| 久久综合成人精品亚洲另类欧美| 日韩欧美专区在线| 欧美电视剧在线观看完整版| 日韩欧美在线综合网| 日韩欧美一区电影| 日韩欧美在线一区二区三区| 欧美大片一区二区| 日韩免费高清视频| 精品蜜桃在线看| 久久精子c满五个校花| 欧美国产一区二区在线观看| 欧美国产精品v| 日韩码欧中文字| 亚洲精品中文在线影院| 亚洲午夜久久久| 婷婷六月综合网| 精品在线观看免费| 国产一区二区三区美女| 北条麻妃一区二区三区| 色综合天天在线| 欧美日本不卡视频| 精品国产精品网麻豆系列| 久久精品夜夜夜夜久久| 日韩美女精品在线| 视频一区欧美精品| 久久精品国产精品亚洲综合| 国产精品99久久久| 色一情一乱一乱一91av| 欧美日韩激情一区| 久久先锋影音av| 亚洲人精品午夜| 男女男精品视频网| 成人av免费在线观看| 欧美日韩在线直播| 久久久午夜精品理论片中文字幕| 中文字幕中文字幕一区二区| 亚洲国产精品一区二区www在线| 日韩不卡一区二区| 成人动漫视频在线| 欧美精品在欧美一区二区少妇| 久久女同互慰一区二区三区| 亚洲欧美日韩中文播放| 免费不卡在线观看| 成人动漫中文字幕| 日韩一级片网站| 国产精品乱码久久久久久| 亚洲主播在线观看| 国产精品影视天天线| 欧美性色欧美a在线播放| 欧美成人精品二区三区99精品| 亚洲视频一二区| 美女网站色91| 在线观看视频欧美| 国产日韩欧美高清| 天天操天天干天天综合网| 国产乱人伦精品一区二区在线观看| 91国产免费观看| 国产欧美一区二区精品性色| 亚洲图片自拍偷拍| 不卡视频免费播放| 日韩精品一区二区三区四区视频| 亚洲美女在线一区| 国产宾馆实践打屁股91| 欧美一级在线视频| 亚洲制服丝袜av| 成人高清av在线| 久久久久久99精品| 青青青爽久久午夜综合久久午夜 | 国内成+人亚洲+欧美+综合在线| 91在线视频官网| 国产视频一区不卡| 麻豆一区二区99久久久久| 欧美日韩国产一级片| 亚洲欧美日韩国产成人精品影院| 国产精品一区二区不卡| 精品少妇一区二区| 青青草国产精品97视觉盛宴| 欧美在线不卡一区| 最新中文字幕一区二区三区 | 免费一级片91| 欧美日韩一级片在线观看| 1区2区3区国产精品| 丁香天五香天堂综合| 久久精品亚洲国产奇米99| 精品一区二区三区影院在线午夜 | 欧美优质美女网站| 自拍偷拍亚洲综合| av爱爱亚洲一区| 日韩伦理免费电影| 91视频观看视频| 亚洲天堂精品在线观看| 99这里都是精品| 国产精品久久久久久久久久久免费看| 国产精品一区二区久久不卡| 久久久精品综合| 福利一区在线观看| 国产精品久久久久久久久晋中 | 日韩精品亚洲一区二区三区免费| 欧美日韩黄色影视| 日韩电影免费一区| 日韩一区二区电影在线| 激情都市一区二区| 国产女同性恋一区二区| 成人黄色小视频| 亚洲精品乱码久久久久久黑人 | 亚洲成人动漫在线观看| 欧美亚洲国产bt| 奇米精品一区二区三区四区 | 丁香激情综合国产| 国产精品色噜噜| 91蜜桃在线免费视频| 一二三区精品视频| 欧美精品在线观看播放| 精品一区二区免费看| 欧美激情一区不卡| 欧美主播一区二区三区| 日本成人超碰在线观看| 久久先锋资源网| 91丨porny丨最新| 天天色天天操综合| 精品国产3级a| 91免费版在线| 免费精品视频在线| 国产精品素人一区二区| 色菇凉天天综合网| 精品一区二区免费看|