public class BeanModelSourceImpl extends Object implements BeanModelSource
Constructor and Description |
---|
BeanModelSourceImpl(TypeCoercer typeCoercer,
PropertyAccess propertyAccess,
PropertyConduitSource propertyConduitSource,
PlasticProxyFactory proxyFactory,
DataTypeAnalyzer dataTypeAnalyzer,
ObjectLocator locator) |
Modifier and Type | Method and Description |
---|---|
<T> BeanModel<T> |
create(Class<T> beanClass,
boolean filterReadOnlyProperties,
Messages messages)
Creates a new model used for editing the indicated bean class.
|
<T> BeanModel<T> |
createDisplayModel(Class<T> beanClass,
Messages messages)
Creates a model for display purposes; this may include properties which are read-only.
|
<T> BeanModel<T> |
createEditModel(Class<T> beanClass,
Messages messages)
Creates a model for edit and update purposes, only properties that are fully read-write are included.
|
public BeanModelSourceImpl(TypeCoercer typeCoercer, PropertyAccess propertyAccess, PropertyConduitSource propertyConduitSource, @ComponentLayer PlasticProxyFactory proxyFactory, @Primary DataTypeAnalyzer dataTypeAnalyzer, ObjectLocator locator)
public <T> BeanModel<T> createDisplayModel(Class<T> beanClass, Messages messages)
BeanModelSource
createDisplayModel
in interface BeanModelSource
beanClass
- class of object to be editedpublic <T> BeanModel<T> createEditModel(Class<T> beanClass, Messages messages)
BeanModelSource
createEditModel
in interface BeanModelSource
beanClass
- class of object to be editedpublic <T> BeanModel<T> create(Class<T> beanClass, boolean filterReadOnlyProperties, Messages messages)
BeanModelSource
ReorderProperties
annotation. 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.create
in interface BeanModelSource
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
).messages
- Used to find explicit overrides of5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.