info.joseluismartin.vaadin.ui.form
Class ComboBoxFieldBuilder

java.lang.Object
  extended by info.joseluismartin.vaadin.ui.form.ComboBoxFieldBuilder
All Implemented Interfaces:
FieldBuilder

public class ComboBoxFieldBuilder
extends Object
implements FieldBuilder

FieldBuilder that creates ComboBox and fill its with items from persistent service

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Constructor Summary
ComboBoxFieldBuilder()
          Creates a new ComboBoxFieldFactory
ComboBoxFieldBuilder(PersistentServiceFactory persistentServiceFactory)
          Creates a new ComboBoxFieldBuilder
 
Method Summary
 com.vaadin.ui.Field build(Class<?> clazz, String name)
          Build a Field
protected  ContainerDataSource<?> buildContainerDataSource(Class<?> clazz)
          Creates a ContainerDataSource for entity class
protected  void fillComboBox(com.vaadin.ui.ComboBox combo, Class<?> clazz, String name)
          Fill the ComboBox with items from PersistentService
 PersistentServiceFactory getPersistentServiceFactory()
           
 void setPersistentServiceFactory(PersistentServiceFactory persistentServiceFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComboBoxFieldBuilder

public ComboBoxFieldBuilder()
Creates a new ComboBoxFieldFactory


ComboBoxFieldBuilder

public ComboBoxFieldBuilder(PersistentServiceFactory persistentServiceFactory)
Creates a new ComboBoxFieldBuilder

Parameters:
persistentServiceFactory - persistentServiceFactory for creating persistent serivices
Method Detail

build

public com.vaadin.ui.Field build(Class<?> clazz,
                                 String name)
Build a Field

Specified by:
build in interface FieldBuilder
Returns:
the field

fillComboBox

protected void fillComboBox(com.vaadin.ui.ComboBox combo,
                            Class<?> clazz,
                            String name)
Fill the ComboBox with items from PersistentService

Parameters:
combo - ComboBox to fill
clazz - Class of Bean containing property name
name - property name

buildContainerDataSource

protected ContainerDataSource<?> buildContainerDataSource(Class<?> clazz)
Creates a ContainerDataSource for entity class

Parameters:
clazz - entity class

getPersistentServiceFactory

public PersistentServiceFactory getPersistentServiceFactory()
Returns:
the persistentServiceFactory

setPersistentServiceFactory

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


Copyright © 2012 JDAL. All Rights Reserved.