| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BeanModel<T>
Provides the information necessary to build a user interface to view, create or edit an instance of a particular type.
BeanModels are not thread-safe, they are also not serializable. Here, and inPropertyModel, the term "propertyName" is used for simplicitly.
 However, a full property
 expression may be utilized when adding new properties to an existing BeanModel.
BeanModelSource| Method Summary | |
|---|---|
 PropertyModel | 
add(RelativePosition position,
       String existingPropertyName,
       String propertyName)
Adds a new property to the model (as with add(String)), ordered before or after an existing property. | 
 PropertyModel | 
add(RelativePosition position,
       String existingPropertyName,
       String propertyName,
       PropertyConduit conduit)
Adds a new property to the model, ordered before or after an existing property.  | 
 PropertyModel | 
add(String propertyName)
Adds a new property to the model, returning its mutable model for further refinement.  | 
 PropertyModel | 
add(String propertyName,
       PropertyConduit conduit)
Adds a new, synthetic property to the model, returning its mutable model for further refinement.  | 
 PropertyModel | 
addEmpty(String propertyName)
Adds an empty property (one with no property conduit).  | 
 PropertyModel | 
addExpression(String propertyName,
                           String expression)
Adds a new synthetic property to the model, returning its mutable model for further refinement.  | 
 BeanModel<T> | 
exclude(String... propertyNames)
Removes the named properties from the model, if present.  | 
 PropertyModel | 
get(String propertyName)
Returns the named model.  | 
 Class<T> | 
getBeanType()
Returns the type of bean for which this model was initially created.  | 
 PropertyModel | 
getById(String propertyId)
Returns the identified model.  | 
 List<String> | 
getPropertyNames()
Returns a list of the editable properties of the bean, in presentation order.  | 
 BeanModel<T> | 
include(String... propertyNames)
Re-orders the properties of the model into the specified order.  | 
 T | 
newInstance()
Creates a new bean instance.  | 
 BeanModel<T> | 
reorder(String... propertyNames)
Re-orders the properties of the model into the specified order.  | 
| Method Detail | 
|---|
Class<T> getBeanType()
T newInstance()
ObjectLocator.autobuild(Class),
 so a public constructor will be used, and dependencies injected.
List<String> getPropertyNames()
PropertyModel get(String propertyName)
propertyName - name of property to retrieve model for (case is ignored)
RuntimeException - if the bean editor model does not have a property model for the provided namePropertyModel getById(String propertyId)
propertyId - matched caselessly against PropertyModel.getId()
RuntimeException - if the bean editor model does not have a property model with the indicated idPropertyModel add(String propertyName)
add(String, org.apache.tapestry5.PropertyConduit)
propertyName - name of property to add
RuntimeException - if the property already exists
PropertyModel addExpression(String propertyName,
                            String expression)
propertyName - name of property to addexpression - expression for the property
RuntimeException - if the property already existsPropertyModel addEmpty(String propertyName)
propertyName - name of property to add
RuntimeException - if the property already exists
PropertyModel add(RelativePosition position,
                  String existingPropertyName,
                  String propertyName)
add(String)), ordered before or after an existing property.
position - controls whether the new property is ordered before or after the existing propertyexistingPropertyName - the name of an existing property (this must exist)propertyName - the new property to add
RuntimeException - if the existing property does not exist, or if the new property already does exist
PropertyModel add(RelativePosition position,
                  String existingPropertyName,
                  String propertyName,
                  PropertyConduit conduit)
position - controls whether the new property is ordered before or after the existing propertyexistingPropertyName - the name of an existing property (this must exist)propertyName - the new property to addconduit - conduit used to read or update the property; this may be null for a synthetic or
                             placeholder property
RuntimeException - if the existing property does not exist, or if the new property already does exist
PropertyModel add(String propertyName,
                  PropertyConduit conduit)
propertyName - name of property to addconduit - the conduit used to read or update the property; this may be null for a synthetic or
                     placeholder property.  Instead of passing null, please invoke addEmpty(String).
RuntimeException - if the property already existsaddExpression(String, String)BeanModel<T> exclude(String... propertyNames)
propertyNames - the names of properties to be removed (case insensitive)
BeanModel<T> reorder(String... propertyNames)
propertyNames - property names in order they should be displayed (case insensitive)
BeanModel<T> include(String... propertyNames)
propertyNames - the names of properties to be retained
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||