info.joseluismartin.vaadin.ui.form
Class AnnotationFieldFactory

java.lang.Object
  extended by com.vaadin.ui.DefaultFieldFactory
      extended by info.joseluismartin.vaadin.ui.form.ConfigurableFieldFactory
          extended by info.joseluismartin.vaadin.ui.form.AnnotationFieldFactory
All Implemented Interfaces:
com.vaadin.ui.FormFieldFactory, com.vaadin.ui.TableFieldFactory, Serializable

public class AnnotationFieldFactory
extends ConfigurableFieldFactory

FieldFactory that create fields based on Annotations.

Author:
Jose Luis Martin - (jlm@joseluismartin.info)
See Also:
Serialized Form

Constructor Summary
AnnotationFieldFactory()
           
 
Method Summary
 com.vaadin.ui.Field createField(com.vaadin.data.Item item, Object propertyId, com.vaadin.ui.Component uiContext)
          
protected  com.vaadin.ui.Field findField(Annotation a, Class<?> clazz, String name)
          Find a field instance for Annotation
 Map<Class<? extends Annotation>,FieldBuilder> getAnnotationMap()
           
 PersistentServiceFactory getPersistentServiceFactory()
           
 void init()
           
 void setAnnotationMap(Map<Class<? extends Annotation>,FieldBuilder> annotationMap)
           
 void setPersistentServiceFactory(PersistentServiceFactory persistentServiceFactory)
           
 
Methods inherited from class info.joseluismartin.vaadin.ui.form.ConfigurableFieldFactory
applyFieldProcessors, createField, findByClass, getClassBuilderMap, getClassFieldMap, getField, getFieldProcessors, getIdBuilderMap, getIdClassMap, setClassBuilderMap, setClassFieldMap, setFieldProcessors, setIdBuilderMap, setIdClassMap
 
Methods inherited from class com.vaadin.ui.DefaultFieldFactory
createCaptionByPropertyId, createFieldByPropertyType, get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationFieldFactory

public AnnotationFieldFactory()
Method Detail

init

public void init()

createField

public com.vaadin.ui.Field createField(com.vaadin.data.Item item,
                                       Object propertyId,
                                       com.vaadin.ui.Component uiContext)

Specified by:
createField in interface com.vaadin.ui.FormFieldFactory
Overrides:
createField in class ConfigurableFieldFactory

findField

protected com.vaadin.ui.Field findField(Annotation a,
                                        Class<?> clazz,
                                        String name)
Find a field instance for Annotation

Parameters:
a - Annotation
name -
clazz -
Returns:
Field instance

getPersistentServiceFactory

public PersistentServiceFactory getPersistentServiceFactory()
Returns:
the persistentServiceFactory

setPersistentServiceFactory

public void setPersistentServiceFactory(PersistentServiceFactory persistentServiceFactory)
Parameters:
persistentServiceFactory - the persistentServiceFactory to set

getAnnotationMap

public Map<Class<? extends Annotation>,FieldBuilder> getAnnotationMap()
Returns:
the annotationMap

setAnnotationMap

public void setAnnotationMap(Map<Class<? extends Annotation>,FieldBuilder> annotationMap)
Parameters:
annotationMap - the annotationMap to set


Copyright © 2012 JDAL. All Rights Reserved.