private static Action getTargetAction(Action action) { if (action instanceof AnnotatedAction) { return getTargetAction(((AnnotatedAction) action).getTargetAction()); } else { return action; } } }
public Event execute(RequestContext context) throws Exception { try { if (logger.isDebugEnabled()) { logger.debug("Putting action execution attributes " + getAttributes()); } context.getAttributes().putAll(getAttributes()); Event result = getTargetAction().execute(context); return postProcessResult(result); } finally { if (logger.isDebugEnabled()) { logger.debug("Clearing action execution attributes " + getAttributes()); } context.getAttributes().removeAll(getAttributes()); } }
public String toString() { return new ToStringCreator(this).append("targetAction", getTargetAction()) .append("attributes", getAttributes()).toString(); } }
private static Action getTargetAction(Action action) { if (action instanceof AnnotatedAction) { return getTargetAction(((AnnotatedAction) action).getTargetAction()); } else { return action; } } }
private static Action getTargetAction(Action action) { if (action instanceof AnnotatedAction) { return getTargetAction(((AnnotatedAction) action).getTargetAction()); } else { return action; } } }
public Event execute(RequestContext context) throws Exception { try { if (logger.isDebugEnabled()) { logger.debug("Putting action execution attributes " + getAttributes()); } context.getAttributes().putAll(getAttributes()); Event result = getTargetAction().execute(context); return postProcessResult(result); } finally { if (logger.isDebugEnabled()) { logger.debug("Clearing action execution attributes " + getAttributes()); } context.getAttributes().removeAll(getAttributes()); } }
public Event execute(RequestContext context) throws Exception { try { if (logger.isDebugEnabled()) { logger.debug("Putting action execution attributes " + getAttributes()); } context.getAttributes().putAll(getAttributes()); Event result = getTargetAction().execute(context); return postProcessResult(result); } finally { if (logger.isDebugEnabled()) { logger.debug("Clearing action execution attributes " + getAttributes()); } context.getAttributes().removeAll(getAttributes()); } }
public String toString() { return new ToStringCreator(this).append("targetAction", getTargetAction()) .append("attributes", getAttributes()).toString(); } }
public String toString() { return new ToStringCreator(this).append("targetAction", getTargetAction()) .append("attributes", getAttributes()).toString(); } }
public void testResolveMultiAction() { MockRequestContext context = new MockRequestContext(); StaticApplicationContext ac = new StaticApplicationContext(); ac.getBeanFactory().registerSingleton("multiAction", new FormAction()); context.getRootFlow().setApplicationContext(ac); Expression exp = parser.parseExpression("multiAction.setupForm", new FluentParserContext().evaluate(RequestContext.class)); AnnotatedAction action = (AnnotatedAction) exp.getValue(context); assertSame(ac.getBean("multiAction"), action.getTargetAction()); assertEquals("setupForm", action.getMethod()); }