|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.ui.declarative.FieldBinder
public class FieldBinder
Binder utility that binds member fields of a design class instance to given
component instances. Only fields of type Component are bound
| Constructor Summary | |
|---|---|
FieldBinder(java.lang.Object design)
Creates a new instance of LayoutFieldBinder. |
|
FieldBinder(java.lang.Object design,
java.lang.Class<?> classWithFields)
Creates a new instance of LayoutFieldBinder. |
|
| Method Summary | |
|---|---|
boolean |
bindField(Component instance)
Tries to bind the given Component instance to a member field of
the bind target. |
boolean |
bindField(Component instance,
java.lang.String localId)
Tries to bind the given Component instance to a member field of
the bind target. |
protected static java.util.List<java.lang.reflect.Field> |
getFields(java.lang.Class<?> searchClass)
Returns a list containing Field objects reflecting all the fields of the class or interface represented by this Class object. |
java.util.Collection<java.lang.String> |
getUnboundFields()
Returns a collection of field names that are not bound. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FieldBinder(java.lang.Object design)
throws java.beans.IntrospectionException
design - the design class instance containing the fields to bind
java.beans.IntrospectionException - if the given design class can not be introspected
public FieldBinder(java.lang.Object design,
java.lang.Class<?> classWithFields)
throws java.beans.IntrospectionException
design - the instance containing the fieldsclassWithFields - the class which defines the fields to bind
java.beans.IntrospectionException - if the given design class can not be introspected| Method Detail |
|---|
public java.util.Collection<java.lang.String> getUnboundFields()
throws FieldBindingException
FieldBindingExceptionpublic boolean bindField(Component instance)
Component instance to a member field of
the bind target. The name of the bound field is constructed based on the
id or caption of the instance, depending on which one is defined. If a
field is already bound (not null), FieldBindingException is
thrown.
instance - the instance to be bound to a field
FieldBindingException - if error occurs when trying to bind the instance to a field
public boolean bindField(Component instance,
java.lang.String localId)
Component instance to a member field of
the bind target. The fields are matched based on localId, id and caption.
instance - the instance to be bound to a fieldlocalId - the localId used for mapping the field to an instance field
FieldBindingException - if error occurs when trying to bind the instance to a fieldprotected static java.util.List<java.lang.reflect.Field> getFields(java.lang.Class<?> searchClass)
searchClass - the class to be scanned for fields
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||