Package org.beangle.struts2.convention.interceptor

Source Code of org.beangle.struts2.convention.interceptor.FlashInterceptor

/* Copyright c 2005-2012.
* Licensed under GNU  LESSER General Public License, Version 3.
* http://www.gnu.org/licenses
*/
package org.beangle.struts2.convention.interceptor;

import org.beangle.struts2.convention.Flash;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

/**
* ROR's flash
*
* @author chaostone
*/
public class FlashInterceptor extends AbstractInterceptor {

  @Override
  public String intercept(ActionInvocation invocation) throws Exception {
    String result = invocation.invoke();
    Flash flash = (Flash) invocation.getInvocationContext().getSession().get("flash");
    if (null != flash) {
      flash.nextToNow();
    }
    return result;
  }

}
TOP

Related Classes of org.beangle.struts2.convention.interceptor.FlashInterceptor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.