dcsimg
When using nested properties it seems that simple nested properties take precedence over mapped properties?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aad_Nales
Posted On:   Thursday, December 1, 2005 06:11 AM

In a jsp page I need access to the value of a nested property. The call to the property is somehting along the lines of: The 'getVersion' in the myObject class come in several variations with the following signatures public getVersion(Locale locale); public getVersion(String localeid); public getVersion(); In the call that I described above I would expect that a call would be made to the second method. However, the call is made to the third method. Is this the desired behavior? For completeness sake I have to say that I do not have any 'setVersions' defined in the myObject class. After changing the signature of the second me   More>>

In a jsp page I need access to the value of a nested property. The call to the property is somehting along the lines of:


			


The 'getVersion' in the myObject class come in several variations with the following signatures


			
public getVersion(Locale locale);
public getVersion(String localeid);
public getVersion();



In the call that I described above I would expect that a call would be made to the second method. However, the call is made to the third method. Is this the desired behavior?



For completeness sake I have to say that I do not have any 'setVersions' defined in the myObject class.

After changing the signature of the second method to:

			
public getVersionOnLocaleId(String localeid);



.. and making the approriate changes to the JSP it all worked fine. Some debugging taught me that the call is eventually handled by PropertyUtilsBean, which is where i stopped. But i do wonder if the parser that generates the calls to the methods should take into account the presence of a parameter when deciding on which method to call?



BTW: I have not yet checked the source but I am willing to make the appropriate changes if the answer to my question is yes!



Aad Nales

   <<Less

Re: When using nested properties it seems that simple nested properties take precedence over mapped properties?

Posted By:   Christopher_Koenigsberg  
Posted On:   Sunday, December 4, 2005 03:45 PM

By definition, a "property" is something returned from a method that takes no parameters.
About | Sitemap | Contact