|
Defines mechanism for binding from a selection (e.g. drop down menu). This bind handler handles
binding where the source (form) property holds the selection key as a String. For example,
suppose you are selecting from product categories. In this case:
- there may be a source property called
selectedCategoryId as a String type,
and containing a BindSelect annotation
- the bean contains a collection which contains the eligible/selectable objects as a
Collection or Map
- the bean has a reference, possibly indirectly via other containing beans, to a target bean
with a a richly typed property, which will be the target of the selection. In our current
example, this may be a
productCategory property of type Category in
a Product bean.
- The select binding operation takes the source
String property, converts it to
the key type of the collection, does the lookup for the object which matches this property, then
binds the object returned from this lookup to the target property.
author: Phil Zoio |