Laurie Harper wrote:
The restriction comes from the Java relection API semantics, not OGNL. A property can only have one type, so it makes sense that the getter and setter for a JavaBean property must agree on that type. Changing this would break compatibility with the JavaBean specification, at the least...

L.

The other thing that you can get in to trouble for with OGNL I discovered months ago way that you cannot perform reference setting. I was at the time retrofitting an old Hibernate example with WebWork for testing.

Consider this class

class A {
        private int f;
        private double b;

        public A setF( int f ) {
                this.f  = f; return this;
        }
        public A setG( int g ) {
                this.g  = g; return this;
        }
}

The reference setters are not strict JavaBean setters because those do not return any type (e.g void). Therefore OGNL fails with class A.

==////==

--
Peter Pilgrim  ( Windows XP / Thunderbird 1.5 )

_________                         ___________________  + Expert Java
______  /_____ ___   _______ _    ___  ____/__  ____/  + Enterprise
___ _  /_  __ `/_ | / /  __ `/    __  __/  __  __/     + Design
/ /_/ / / /_/ /__ |/ // /_/ /     _  /___  _  /___     + Architecture
\____/  \__,_/ _____/ \__,_/      /_____/  /_____/     + Web New Age

On Line Resume
   ||
   \\===>  `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to