Package org.springframework.binding.form

Examples of org.springframework.binding.form.FieldFace


    EasyMock.expect(mockIconSource.getIcon("iconName")).andReturn(testIcon);
    EasyMock.replay(mockIconSource);

    fieldFaceSource.setIconSource(mockIconSource);

    FieldFace face = fieldFaceSource.loadFieldFace("field", "context");

    assertEquals("the caption", face.getCaption());
    assertEquals("the label", face.getDisplayName());
    assertEquals("the description", face.getDescription());

    assertEquals(testIcon, face.getIcon());

    EasyMock.verify(mockIconSource);
  }
View Full Code Here


        return getFieldFace(field, null);
    }

    public FieldFace getFieldFace(final String field, final Object context) {
        Map faceDescriptors = (Map) cachedFieldFaceDescriptors.get(context == null ? DEFAULT_CONTEXT : context);
        FieldFace fieldFaceDescriptor = (FieldFace) faceDescriptors.get(field);
        if (fieldFaceDescriptor == null) {
            fieldFaceDescriptor = loadFieldFace(field, context);
            Assert.notNull(fieldFaceDescriptor, "FieldFace must not be null.");
            faceDescriptors.put(field, fieldFaceDescriptor);
        }
View Full Code Here

TOP

Related Classes of org.springframework.binding.form.FieldFace

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.