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 properties is determined from the order of the getter methods in the code, and can be overridden with the {@link org.apache.tapestry5.beaneditor.ReorderProperties} annotation. The labels for theproperties 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.
@param beanClass class of object to be edited
@param filterReadOnlyProperties if true, then properties that are read-only will be skipped (leaving onlyread-write properties, appropriate for {@link org.apache.tapestry5.corelib.components.BeanEditForm}, etc.). If false, then both read-only and read-write properties will be included (appropriate for {@link org.apache.tapestry5.corelib.components.Grid} or {@link org.apache.tapestry5.corelib.components.BeanDisplay}).
@param messages Used to find explicit overrides of
@return a model