Package org.springframework.binding.mapping.impl

Examples of org.springframework.binding.mapping.impl.DefaultMappingResults


    });
    subflow.setInputMapper(new Mapper() {
      public MappingResults map(Object source, Object target) {
        MutableAttributeMap map = (MutableAttributeMap) source;
        assertEquals("bar", map.get("foo"));
        return new DefaultMappingResults(source, target, Collections.EMPTY_LIST);
      }
    });
    new State(subflow, "whatev") {
      protected void doEnter(RequestControlContext context) throws FlowExecutionException {
      }
View Full Code Here


    new EndState(subflow, "end");
    subflow.setOutputMapper(new Mapper() {
      public MappingResults map(Object source, Object target) {
        MutableAttributeMap map = (MutableAttributeMap) target;
        map.put("foo", "bar");
        return new DefaultMappingResults(source, target, Collections.EMPTY_LIST);
      }
    });
    subflowState.enter(context);
    assertEquals("parent", context.getActiveFlow().getId());
  }
View Full Code Here

    subflow.setInputMapper(new Mapper() {
      @SuppressWarnings("unchecked")
      public MappingResults map(Object source, Object target) {
        MutableAttributeMap<Object> map = (MutableAttributeMap<Object>) source;
        assertEquals("bar", map.get("foo"));
        return new DefaultMappingResults(source, target, Collections.<MappingResult> emptyList());
      }
    });
    new State(subflow, "whatev") {
      protected void doEnter(RequestControlContext context) throws FlowExecutionException {
      }
View Full Code Here

    subflow.setOutputMapper(new Mapper() {
      @SuppressWarnings("unchecked")
      public MappingResults map(Object source, Object target) {
        MutableAttributeMap<Object> map = (MutableAttributeMap<Object>) target;
        map.put("foo", "bar");
        return new DefaultMappingResults(source, target, Collections.<MappingResult> emptyList());
      }
    });
    subflowState.enter(context);
    assertEquals("parent", context.getActiveFlow().getId());
  }
View Full Code Here

      public boolean isRequired() {
        return true;
      }
    };
    mappingResults.add(new TypeConversionError(mapping, "bogus", null));
    DefaultMappingResults results = new DefaultMappingResults(source, testBean, mappingResults);
    model.setMappingResults(results);
    assertEquals("bogus", model.getFieldValue("datum2"));
    // not offically an error until an actual error message is associated with field
    assertEquals(0, model.getErrorCount());
    assertEquals(0, model.getFieldErrorCount());
View Full Code Here

TOP

Related Classes of org.springframework.binding.mapping.impl.DefaultMappingResults

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.