Binding factory for reading and updating JavaBean properties. Uses {@link org.apache.tapestry.ioc.services.PropertyAccess} to analyze the properties, and generatesa binding class using the component {@link org.apache.tapestry.ioc.services.ClassFactory}.
The {@link Binding} object that's returned is from a runtime-genereated class. The propertyexpression is turned into type-safe Java code.
The expression is a dotted sequence of terms. Each term is either a property name, or the name of a public method. In the latter case, the term includes open and close parenthesis (the method must take no parameters and throw no checked exceptions). A method name is treated as if it were a read-only property.
Example property expressions:
- userName
- userData.name
- usreList.size()
Everything works in terms of the property or methods declared type, not the actual type. This means that, for example, if a property is type Collection, you may not reference the listIterator() method, even if the actual value returned is of type List. This is only really bites you when a method's return type is Object.
TODO: Split most of this out into a new service that generates a PropertyConduit. This will allow the {@link BeanEditForm}/ {@link BeanEditorModelSource} make use of the same expressions thatare supported here.