| A ResourceBundle implementation which facilitates the use of select
boxes in forms for properties with
ConstrainedProperty.inList inList constraints.
Example use:
Template t = ...
List<Club> clubs = ...;
ClubSelectionBean bean = ...;
Map<String,String> names = new HashMap<String,String>(clubs.size());
for (Club club : clubs) {
names.put(club.getUniqueName(), club.getFullName());
}
bean.getConstrainedProperty("clubUniqueName")
.setInList(names.keySet());
t.addResourceBundle(new SelectResourceBundle("clubUniqueName", names));
generateForm(t, bean);
print(t);
author: Keith Lea , author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3308 $ since: 1.0 |