Examples of StaticExpression


Examples of org.springframework.binding.expression.support.StaticExpression

    MockRequestControlContext context = new MockRequestControlContext();
    context.putRequestParameter("_eventId", "submit");
    context.putRequestParameter("integerProperty", "bogus 1");
    context.putRequestParameter("dateProperty", "bogus 2");
    BindBean bindBean = new BindBean();
    StaticExpression modelObject = new StaticExpression(bindBean);
    modelObject.setExpressionString("bindBean");
    context.getCurrentState().getAttributes().put("model", modelObject);
    context.getFlowScope().put("bindBean", bindBean);
    context.getMockExternalContext().setNativeContext(new MockServletContext());
    context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
    context.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
View Full Code Here

Examples of org.springframework.binding.expression.support.StaticExpression

    context.putRequestParameter("stringProperty", "foo");
    context.putRequestParameter("integerProperty", "5");
    context.putRequestParameter("dateProperty", "2007-01-01");
    context.putRequestParameter("beanProperty.name", "foo");
    BindBean bindBean = new BindBean();
    StaticExpression modelObject = new StaticExpression(bindBean);
    modelObject.setExpressionString("bindBean");
    context.getCurrentState().getAttributes().put("model", modelObject);
    context.getFlowScope().put("bindBean", bindBean);
    context.getMockExternalContext().setNativeContext(new MockServletContext());
    context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
    context.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
View Full Code Here

Examples of org.springframework.binding.expression.support.StaticExpression

  public void testResumeEventModelBindingFieldMarker() throws Exception {
    MockRequestContext context = new MockRequestContext();
    context.putRequestParameter("_eventId", "submit");
    context.putRequestParameter("_booleanProperty", "whatever");
    BindBean bindBean = new BindBean();
    StaticExpression modelObject = new StaticExpression(bindBean);
    modelObject.setExpressionString("bindBean");
    context.getCurrentState().getAttributes().put("model", modelObject);
    context.getFlowScope().put("bindBean", bindBean);
    context.getMockExternalContext().setNativeContext(new MockServletContext());
    context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
    context.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
View Full Code Here

Examples of org.springframework.binding.expression.support.StaticExpression

    MockRequestContext context = new MockRequestContext();
    context.putRequestParameter("_eventId", "submit");
    context.putRequestParameter("booleanProperty", "true");
    context.putRequestParameter("_booleanProperty", "whatever");
    BindBean bindBean = new BindBean();
    StaticExpression modelObject = new StaticExpression(bindBean);
    modelObject.setExpressionString("bindBean");
    context.getCurrentState().getAttributes().put("model", modelObject);
    context.getFlowScope().put("bindBean", bindBean);
    context.getMockExternalContext().setNativeContext(new MockServletContext());
    context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
    context.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
View Full Code Here

Examples of org.springframework.binding.expression.support.StaticExpression

    context.putRequestParameter("_eventId", "submit");
    context.putRequestParameter("stringProperty", "foo");
    context.putRequestParameter("integerProperty", "5");
    context.putRequestParameter("dateProperty", "2007-01-01");
    BindBean bindBean = new ValidatingBindBean();
    StaticExpression modelObject = new StaticExpression(bindBean);
    modelObject.setExpressionString("bindBean");
    context.getCurrentState().getAttributes().put("model", modelObject);
    context.getFlowScope().put("bindBean", bindBean);
    context.getMockExternalContext().setNativeContext(new MockServletContext());
    context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
    context.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
View Full Code Here

Examples of org.springframework.binding.expression.support.StaticExpression

    context.putRequestParameter("_eventId", "submit");
    context.putRequestParameter("stringProperty", "foo");
    context.putRequestParameter("integerProperty", "5");
    context.putRequestParameter("dateProperty", "2007-01-01");
    BindBean bindBean = new ValidatingBindBeanFallback();
    StaticExpression modelObject = new StaticExpression(bindBean);
    modelObject.setExpressionString("bindBean");
    context.getCurrentState().getAttributes().put("model", modelObject);
    context.getFlowScope().put("bindBean", bindBean);
    context.getMockExternalContext().setNativeContext(new MockServletContext());
    context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
    context.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
View Full Code Here

Examples of org.springframework.binding.expression.support.StaticExpression

    context.putRequestParameter("_eventId", "submit");
    context.putRequestParameter("stringProperty", "foo");
    context.putRequestParameter("integerProperty", "bogus");
    context.putRequestParameter("dateProperty", "2007-01-01");
    BindBean bindBean = new ValidatingBindBean();
    StaticExpression modelObject = new StaticExpression(bindBean);
    modelObject.setExpressionString("bindBean");
    context.getCurrentState().getAttributes().put("model", modelObject);
    context.getFlowScope().put("bindBean", bindBean);
    context.getMockExternalContext().setNativeContext(new MockServletContext());
    context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
    context.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
View Full Code Here

Examples of org.springframework.binding.expression.support.StaticExpression

    context.putRequestParameter("_eventId", "submit");
    context.putRequestParameter("stringProperty", "foo");
    context.putRequestParameter("integerProperty", "bogus");
    context.putRequestParameter("dateProperty", "2007-01-01");
    BindBean bindBean = new ValidatingBindBean();
    StaticExpression modelObject = new StaticExpression(bindBean);
    modelObject.setExpressionString("bindBean");
    context.getMockFlowExecutionContext().putAttribute("validateOnBindingErrors", Boolean.FALSE);
    context.getCurrentState().getAttributes().put("model", modelObject);
    context.getFlowScope().put("bindBean", bindBean);
    context.getMockExternalContext().setNativeContext(new MockServletContext());
    context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
View Full Code Here

Examples of org.springframework.binding.expression.support.StaticExpression

* @author Jeremy Grelle
*/
public class EvaluateActionTests extends TestCase {

  public void testEvaluateExpressionNoResultExposer() throws Exception {
    EvaluateAction action = new EvaluateAction(new StaticExpression("bar"), null);
    MockRequestContext context = new MockRequestContext();
    Event result = action.execute(context);
    assertEquals("bar", result.getId());
  }
View Full Code Here

Examples of org.springframework.binding.expression.support.StaticExpression

    Event result = action.execute(context);
    assertEquals("bar", result.getId());
  }

  public void testEvaluateExpressionEmptyStringResult() throws Exception {
    EvaluateAction action = new EvaluateAction(new StaticExpression(""), null);
    MockRequestContext context = new MockRequestContext();
    Event result = action.execute(context);
    assertEquals("null", result.getId());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.