org.apache.tapestry.services
Interface BeanModelSource
- All Known Implementing Classes:
- BeanModelSourceImpl
public interface BeanModelSource
Used by a component to create a default BeanModel for a particular bean class. Also provides support to the
model by generating validation information for individual fields.
BeanModels are the basis for the BeanEditor and Grid comopnents.
- See Also:
PropertyConduitSource
|
Method Summary |
|
create(Class<T> beanClass,
boolean filterReadOnlyProperties,
ComponentResources resources)
Creates a new model used for editing the indicated bean class. |
create
<T> BeanModel<T> create(Class<T> beanClass,
boolean filterReadOnlyProperties,
ComponentResources resources)
- Creates a new model used for editing the indicated bean class. The model will represent all read/write properties
of the bean. The order of the properties is defined by the
OrderBefore annotation on the getter or setter
methods. The labels for the properties are derived from the property names, but if the component's message
catalog has keys of the form propertyName-label, then those will be used instead.
Models are mutable, so they are not cached, a fresh instance is created each time.
- Parameters:
beanClass - class of object to be editedfilterReadOnlyProperties - if true, then properties that are read-only will be skipped (leaving only
read-write properties, appropriate for BeanEditForm,
etc.). If false, then both read-only and read-write properties will be included
(appropriate for Grid or BeanDisplay).resources - used when resolving resources, especially component messages (used to access
labels)
- Returns:
- a model
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.