本文整理匯總了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;
}