T - the type of the entityID - the type of the ID field of the entitypublic class EntityToIdConverter2<ID,T extends Entity<ID>>
Converts an entity to its ID and back. Useful for combo boxes which shows a list of entities as their options while being bound to a field containing ID of that entity.
| Constructor and Description |
|---|
EntityToIdConverter2(java.lang.Class<T> clazz)
Converts an entity to its ID and back. Useful for combo boxes which shows a list of entities as their options while being bound to a
field containing ID of that entity.
|
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.data.binder.Result<ID> |
convertToModel(T value,
com.vaadin.flow.data.binder.ValueContext context) |
T |
convertToPresentation(ID value,
com.vaadin.flow.data.binder.ValueContext context) |
java.lang.Class<T> |
getClazz() |
public EntityToIdConverter2(java.lang.Class<T> clazz)
Converts an entity to its ID and back. Useful for combo boxes which shows a list of entities as their options while being bound to a field containing ID of that entity.
public com.vaadin.flow.data.binder.Result<ID> convertToModel(T value,
com.vaadin.flow.data.binder.ValueContext context)
public T convertToPresentation(ID value,
com.vaadin.flow.data.binder.ValueContext context)
public java.lang.Class<T> getClazz()