/** * {@inheritDoc} */ @Override public void addPostProcessor(SessionPostProcessor sessionPostProcessor) { this.invocation.addPreResultListener(new SessionResultListener(this, sessionPostProcessor)); }
invocation.addPreResultListener(this); List<Method> methods = new ArrayList<Method>(AnnotationUtils.getAnnotatedMethods(action.getClass(), Before.class)); if (methods.size() > 0) {
invocation.addPreResultListener(new PreResultListener()
invocation.addPreResultListener(new PreResultListener() { public void beforeResult(ActionInvocation invocation, String resultCode) { Map<Object, Object> fakie = (Map<Object, Object>) invocation.getInvocationContext().get(ORIGINAL_PROPERTY_OVERRIDE);
@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(); }
invocation.addPreResultListener(new PreResultListener() { public void beforeResult(ActionInvocation invocation, String resultCode) { ValueStack stack = ActionContext.getContext().getValueStack();
invocation.addPreResultListener(new PreResultListener() { @Override public void beforeResult(ActionInvocation invocation, String resultCode) {
@SuppressWarnings("unchecked") private ActionProxy getProxy(String uri) { ServletActionContext.setRequest(request); request.setRequestURI(uri); ActionMapping mapping = getActionMapping(request); String namespace = mapping.getNamespace(); String name = mapping.getName(); String method = mapping.getMethod(); ActionProxy proxy = this.actionProxyFactory.createActionProxy(namespace, name, method, new HashMap<String, Object>(), true, false); TestActionProxy testProxy = new TestActionProxy(proxy); testProxy.addExecutionListener(this); this.actionFromProxy = (T) proxy.getAction(); proxy.setExecuteResult(isExecuteResult()); ActionContext invocationContext = proxy.getInvocation().getInvocationContext(); invocationContext.setParameters(new HashMap<String, Object>(request.getParameterMap())); invocationContext.setSession(session); // set the action context to the one used by the proxy ActionContext.setContext(invocationContext); ServletActionContext.setServletContext(servletContext); ServletActionContext.setRequest(request); ServletActionContext.setResponse(response); proxy.getInvocation().addPreResultListener(this); return testProxy; }