Re: OGNL - Getter and setter types must match

2006-06-29 Thread Peter Pilgrim
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, a

Re: OGNL - Getter and setter types must match

2006-06-28 Thread Laurie Harper
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. I

Re: OGNL - Getter and setter types must match

2006-06-27 Thread Jason Carreira
> I did think about it, and it's not logical. Why do I > want to lump getters > and setters together to fit some artificial notion of > a "property?" The > answer is I don't. I don't think there's a > justification for doing so that > matters to users, and there are plenty of reason for > a getter

Re: OGNL - Getter and setter types must match

2006-06-27 Thread Wendy Smoak
On 6/27/06, Jason Carreira <[EMAIL PROTECTED]> wrote: It has to do with the java.beans.Introspector. It doesn't find the properties correctly if the getter and setter don't match. It won't be able to figure out what the property type is if they aren't the same for the same name. It's in Secti

Re: OGNL - Getter and setter types must match

2006-06-27 Thread Bob Lee
I did think about it, and it's not logical. Why do I want to lump getters and setters together to fit some artificial notion of a "property?" The answer is I don't. I don't think there's a justification for doing so that matters to users, and there are plenty of reason for a getter and setter to r

Re: OGNL - Getter and setter types must match

2006-06-27 Thread Jason Carreira
It has to do with the java.beans.Introspector. It doesn't find the properties correctly if the getter and setter don't match. It won't be able to figure out what the property type is if they aren't the same for the same name. I don't remember what the heuristic is, but if you think about it, it

Re: OGNL - Getter and setter types must match

2006-06-27 Thread Ian Roughley
I'd be up for lifting the restriction, but I also don't have access to the code. /Ian Bob Lee wrote: Thanks for the explanation. What a silly restriction. Anybody up for removing it? I don't have access to the OGNL source. Bob On 6/27/06, Ian Roughley <[EMAIL PROTECTED]> wrote: I've come

Re: OGNL - Getter and setter types must match

2006-06-27 Thread Bob Lee
Thanks for the explanation. What a silly restriction. Anybody up for removing it? I don't have access to the OGNL source. Bob On 6/27/06, Ian Roughley <[EMAIL PROTECTED]> wrote: I've come across this also, and the way I explained it was that it had something to do with matching getters and set

Re: OGNL - Getter and setter types must match

2006-06-27 Thread Wendy Smoak
On 6/27/06, Bob Lee <[EMAIL PROTECTED]> wrote: I've run into this problem with OGNL where I want it to invoke a setter, but if there's a getter method with the same property name but a different type, OGNL will just fail silently. Why does it even care about the getter? Anyone have an idea of wha

Re: OGNL - Getter and setter types must match

2006-06-27 Thread Ian Roughley
I've come across this also, and the way I explained it was that it had something to do with matching getters and setters to be well formed java beans. Although I never took the time to look into it further. /Ian Bob Lee wrote: I've run into this problem with OGNL where I want it to invoke a

OGNL - Getter and setter types must match

2006-06-27 Thread Bob Lee
I've run into this problem with OGNL where I want it to invoke a setter, but if there's a getter method with the same property name but a different type, OGNL will just fail silently. Why does it even care about the getter? Anyone have an idea of what's going on here? I'm working against the OGNL