Search in sources :

Example 11 with ClassAccessor

use of com.manydesigns.elements.reflection.ClassAccessor in project Portofino by ManyDesigns.

the class SelectFieldTest3 method setupSelectFields.

private void setupSelectFields(Mode mode) {
    ClassAccessor classAccessor = JavaClassAccessor.getClassAccessor(SelectBean3.class);
    PropertyAccessor myPropertyAccessor = null;
    try {
        myPropertyAccessor = classAccessor.getProperty("longValue");
    } catch (NoSuchFieldException e) {
        fail(e.getMessage(), e);
    }
    // impostiamo selectField1
    selectField = new SelectField(myPropertyAccessor, mode, null);
    selectField.setSelectionModel(selectionModel);
}
Also used : PropertyAccessor(com.manydesigns.elements.reflection.PropertyAccessor) JavaClassAccessor(com.manydesigns.elements.reflection.JavaClassAccessor) ClassAccessor(com.manydesigns.elements.reflection.ClassAccessor)

Example 12 with ClassAccessor

use of com.manydesigns.elements.reflection.ClassAccessor in project Portofino by ManyDesigns.

the class TextFieldTest method setupFields.

private void setupFields(Mode mode) {
    ClassAccessor classAccessor = JavaClassAccessor.getClassAccessor(this.getClass());
    try {
        PropertyAccessor myPropertyAccessor = classAccessor.getProperty("myText");
        textField = new TextField(myPropertyAccessor, mode, null);
        myPropertyAccessor = classAccessor.getProperty("annotatedText");
        annotatedTextField = new TextField(myPropertyAccessor, mode, null);
    } catch (NoSuchFieldException e) {
        fail("No such field", e);
    }
}
Also used : PropertyAccessor(com.manydesigns.elements.reflection.PropertyAccessor) JavaClassAccessor(com.manydesigns.elements.reflection.JavaClassAccessor) ClassAccessor(com.manydesigns.elements.reflection.ClassAccessor)

Example 13 with ClassAccessor

use of com.manydesigns.elements.reflection.ClassAccessor in project Portofino by ManyDesigns.

the class AnnotatedSelectFieldTest method setupField.

private void setupField(Mode mode) throws Exception {
    ClassAccessor classAccessor = JavaClassAccessor.getClassAccessor(this.getClass());
    PropertyAccessor myPropertyAccessor = classAccessor.getProperty("myText");
    selectField = new SelectField(myPropertyAccessor, mode, null);
}
Also used : PropertyAccessor(com.manydesigns.elements.reflection.PropertyAccessor) JavaClassAccessor(com.manydesigns.elements.reflection.JavaClassAccessor) ClassAccessor(com.manydesigns.elements.reflection.ClassAccessor)

Example 14 with ClassAccessor

use of com.manydesigns.elements.reflection.ClassAccessor in project Portofino by ManyDesigns.

the class DateFieldTest method setupFields.

private void setupFields(Mode mode) {
    ClassAccessor classAccessor = JavaClassAccessor.getClassAccessor(this.getClass());
    try {
        PropertyAccessor myPropertyAccessor = classAccessor.getProperty("date");
        dateField = new DateField(myPropertyAccessor, mode, null);
    } catch (NoSuchFieldException e) {
        fail(e.getMessage(), e);
    }
}
Also used : PropertyAccessor(com.manydesigns.elements.reflection.PropertyAccessor) JavaClassAccessor(com.manydesigns.elements.reflection.JavaClassAccessor) ClassAccessor(com.manydesigns.elements.reflection.ClassAccessor)

Example 15 with ClassAccessor

use of com.manydesigns.elements.reflection.ClassAccessor in project Portofino by ManyDesigns.

the class NumericFieldTest method setUp.

@Override
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    myDecimal = null;
    ClassAccessor classAccessor = JavaClassAccessor.getClassAccessor(this.getClass());
    PropertyAccessor myPropertyAccessor = classAccessor.getProperty("myDecimal");
    decimalField = new NumericField(myPropertyAccessor, Mode.EDIT, null);
}
Also used : PropertyAccessor(com.manydesigns.elements.reflection.PropertyAccessor) JavaClassAccessor(com.manydesigns.elements.reflection.JavaClassAccessor) ClassAccessor(com.manydesigns.elements.reflection.ClassAccessor) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

ClassAccessor (com.manydesigns.elements.reflection.ClassAccessor)18 JavaClassAccessor (com.manydesigns.elements.reflection.JavaClassAccessor)14 PropertyAccessor (com.manydesigns.elements.reflection.PropertyAccessor)13 FilteredClassAccessor (com.manydesigns.elements.reflection.FilteredClassAccessor)2 BigDecimal (java.math.BigDecimal)2 FileObject (org.apache.commons.vfs2.FileObject)2 Session (org.hibernate.Session)2 JSONStringer (org.json.JSONStringer)2 FileBlob (com.manydesigns.elements.annotations.FileBlob)1 Blob (com.manydesigns.elements.blobs.Blob)1 HierarchicalBlobManager (com.manydesigns.elements.blobs.HierarchicalBlobManager)1 AbstractBlobField (com.manydesigns.elements.fields.AbstractBlobField)1 Field (com.manydesigns.elements.fields.Field)1 FileBlobField (com.manydesigns.elements.fields.FileBlobField)1 DateSearchField (com.manydesigns.elements.fields.search.DateSearchField)1 MutableHttpServletRequest (com.manydesigns.elements.servlet.MutableHttpServletRequest)1 ActionDescriptor (com.manydesigns.portofino.actions.ActionDescriptor)1 Annotation (com.manydesigns.portofino.model.Annotation)1 Model (com.manydesigns.portofino.model.Model)1 Property (com.manydesigns.portofino.model.Property)1