struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: OGNL - Getter and setter types must match
Date Wed, 28 Jun 2006 21:41:27 GMT
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.

Ian Roughley wrote:
> 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 <ian@fdar.com> wrote:
>>>
>>> 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
>>> > 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 version that went out w/ WW 2.2.2.
>>> >
>>> > Bob
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message