Package org.springframework.binding

Examples of org.springframework.binding.MutablePropertyAccessStrategy


    }

    public void testChildPropertyAccessStrategy() {
        final TestBean nestedProperty = new TestBean();
        testBean.setNestedProperty(nestedProperty);
        MutablePropertyAccessStrategy cpas = pas.getPropertyAccessStrategyForPath("nestedProperty");

        assertEquals("Child domainObjectHolder should equal equivalent parent ValueModel",
                pas.getPropertyValueModel("nestedProperty"), cpas.getDomainObjectHolder());

        vm = cpas.getPropertyValueModel("simpleProperty");
        assertEquals("Child should return the same ValueModel as parent",
                pas.getPropertyValueModel("nestedProperty.simpleProperty"), vm);

        Block setValueDirectly = new Block() {
            public void handle(Object newValue) {
View Full Code Here


   */
  public boolean test(Object o) {
    Collection domainObjects = (Collection)o;
    distinctValueTable = new HashMap((int)(domainObjects.size() * .75));
    Iterator it = domainObjects.iterator();
    MutablePropertyAccessStrategy accessor = null;
    while (it.hasNext()) {
      Object domainObject = it.next();
      if (accessor == null) {
        accessor = createPropertyAccessStrategy(domainObject);
      }
      else {
        accessor.getDomainObjectHolder().setValue(domainObject);
      }
      Object propertyValue = accessor.getPropertyValue(propertyName);
      Integer hashCode;
      if (propertyValue == null) {
        hashCode = new Integer(0);
      }
      else {
View Full Code Here

TOP

Related Classes of org.springframework.binding.MutablePropertyAccessStrategy

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.