本文整理汇总了Java中com.opensymphony.xwork2.ActionInvocation.addPreResultListener方法的典型用法代码示例。如果您正苦于以下问题:Java ActionInvocation.addPreResultListener方法的具体用法?Java ActionInvocation.addPreResultListener怎么用?Java ActionInvocation.addPreResultListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.opensymphony.xwork2.ActionInvocation
的用法示例。
在下文中一共展示了ActionInvocation.addPreResultListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: intercept
import com.opensymphony.xwork2.ActionInvocation; //导入方法依赖的package包/类
@Override
public String intercept(ActionInvocation invocation) throws Exception {
Object action = invocation.getAction();
if (action instanceof ModelDriven) {
ModelDriven modelDriven = (ModelDriven) action;
ValueStack stack = invocation.getStack();
Object model = modelDriven.getModel();
if (model != null) {
stack.push(model);
}
if (refreshModelBeforeResult) {
invocation.addPreResultListener(new RefreshModelBeforeResult(modelDriven, model));
}
}
return invocation.invoke();
}
示例2: intercept
import com.opensymphony.xwork2.ActionInvocation; //导入方法依赖的package包/类
@Override
public final String intercept( ActionInvocation actionInvocation ) throws Exception
{
actionInvocation.addPreResultListener( this );
executePreResultListener = true;
try
{
return actionInvocation.invoke();
}
catch ( Exception e )
{
executePreResultListener = false;
throw e;
}
}
示例3: intercept
import com.opensymphony.xwork2.ActionInvocation; //导入方法依赖的package包/类
public String intercept(ActionInvocation invocation)
throws Exception
{
// ��һ�����ؽ���ļ�����ע�����������
invocation.addPreResultListener(new MyPreResultListener());
System.out.println("execute����ִ��֮ǰ������...");
// ������һ��������������Action�ı����ط���
String result = invocation.invoke();
System.out.println("execute����ִ��֮�������...");
return result;
}
示例4: intercept
import com.opensymphony.xwork2.ActionInvocation; //导入方法依赖的package包/类
public String intercept(ActionInvocation invocation) throws Exception {
invocation.addPreResultListener(this);
return invocation.invoke();
}
示例5: intercept
import com.opensymphony.xwork2.ActionInvocation; //导入方法依赖的package包/类
public String intercept(ActionInvocation invocation) throws Exception {
LOG.trace("entering MessageStoreInterceptor ...");
before(invocation);
LOG.trace("Registering listener to store messages before result will be executed");
invocation.addPreResultListener(new MessageStorePreResultListener(this));
String result = invocation.invoke();
LOG.debug("exit executing MessageStoreInterceptor");
return result;
}