On 10/24/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote:
More precisely, JSF (like Struts, Commons BeanUtils, and Commons Digester) expects the Java classes it deals with to conform to the property naming conventions of the JavaBean Specification (including the ability to override the default names by providing your own BeanInfo classes).
You're looking for this:
http://java.sun.com/products/javabeans/docs/spec.html
Check out Chapter 7 for information about properties, and Chapter 8 about how introspection can be used to determine what properties (etc.) a particular class has. For further reading, JSF's event handling APIs also conform to the bean patterns described in Chapter 6.
Craig
> But in the EL, you still use the *property name* not the accessor
method.
That's not completely true, is it? We have getAbc() and isXyz() methods
that have no corresponding property in the class, and we reference them
fine using #{myBean.abc} and #{myBean.xyz} notation. So, as far as I
can see, JSF just mechanically translates myBean.abc to myBean.getAbc()
or myBean.isAbc(), depending upon the context.
More precisely, JSF (like Struts, Commons BeanUtils, and Commons Digester) expects the Java classes it deals with to conform to the property naming conventions of the JavaBean Specification (including the ability to override the default names by providing your own BeanInfo classes).
By the way, do you have a link for the Java spec that lists the bean
property naming rules. I hunted around, but I couldn't locate the exact
spec.
You're looking for this:
http://java.sun.com/products/javabeans/docs/spec.html
Check out Chapter 7 for information about properties, and Chapter 8 about how introspection can be used to determine what properties (etc.) a particular class has. For further reading, JSF's event handling APIs also conform to the bean patterns described in Chapter 6.
Thanks,
- Brendan
Craig

