Package org.springframework.webflow.execution

Examples of org.springframework.webflow.execution.Event


   * @param source the source of the event
   * @param eventId the result event identifier
   * @return the event
   */
  public Event event(Object source, String eventId) {
    return new Event(source, eventId, null);
  }
View Full Code Here


   * @param eventId the result event identifier
   * @param attributes the event payload attributes
   * @return the event
   */
  public Event event(Object source, String eventId, AttributeMap attributes) {
    return new Event(source, eventId, attributes);
  }
View Full Code Here

   * @param attributeName the attribute name
   * @param attributeValue the attribute value
   * @return the event
   */
  public Event event(Object source, String eventId, String attributeName, Object attributeValue) {
    return new Event(source, eventId, CollectionUtils.singleEntryMap(attributeName, attributeValue));
  }
View Full Code Here

  public void setResultAttributes(AttributeMap resultAttributes) {
    this.resultAttributes = resultAttributes;
  }

  public Event execute(RequestContext context) {
    return new Event(this, resultEventId, resultAttributes);
  }
View Full Code Here

  public boolean hasFlowEvent() {
    return requestContext.getExternalContext().getRequestMap().contains(EVENT_KEY);
  }

  public Event getFlowEvent() {
    return new Event(this, getEventId());
  }
View Full Code Here

      public Event execute(RequestContext context) throws Exception {
        assertSessionBound();
        Session session = (Session) context.getFlowScope().get("persistenceContext");
        TestBean bean = (TestBean) session.get(TestBean.class, new Long(0));
        bean.incrementCount();
        return new Event(this, "success");
      }
    };
  }
View Full Code Here

    assertTrue(context.isPropertyResolved());
  }

  public void testGetType_CurrentEvent() {
    MockRequestContext requestContext = new MockRequestContext();
    requestContext.setCurrentEvent(new Event(this, "foo"));
    RequestContextHolder.setRequestContext(requestContext);
    assertTrue(ClassUtils.isAssignable(Event.class, context.getELResolver().getType(context, null, "currentEvent")));
    assertTrue(context.isPropertyResolved());
  }
View Full Code Here

    assertTrue(context.isPropertyResolved());
  }

  public void testGetValue_CurrentEvent() {
    MockRequestContext requestContext = new MockRequestContext();
    requestContext.setCurrentEvent(new Event(this, "foo"));
    RequestContextHolder.setRequestContext(requestContext);
    assertSame(requestContext.getCurrentEvent(), context.getELResolver().getValue(context, null, "currentEvent"));
    assertTrue(context.isPropertyResolved());
  }
View Full Code Here

        assertSessionBound();
        EntityManager em = (EntityManager) context.getFlowScope().get("persistenceContext");
        TestBean bean = (TestBean) em.getReference(TestBean.class, new Long(0));
        bean.incrementCount();
        assertNotNull(bean);
        return new Event(this, "success");
      }
    };
  }
View Full Code Here

    assertTrue(formObject instanceof TestBean);
    assertTrue(errors.getTarget() instanceof TestBean);
    assertSame(formObject, errors.getTarget());

    context = new MockRequestContext();
    context.setCurrentEvent(new Event(this, "start"));

    OtherTestBean freshBean = new OtherTestBean();
    context.getFlowScope().put("test", freshBean);
    context.getRequestScope().put(BindingResult.MODEL_KEY_PREFIX + "test", errors);
View Full Code Here

TOP

Related Classes of org.springframework.webflow.execution.Event

Copyright © 2018 www.massapicom. 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.