Bugs item #926213, was opened at 2004-03-30 21:51
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=926213&group_id=73068

Category: main tag library
Group: planned for 1.0
Status: Open
Resolution: None
Priority: 5
Submitted By: fabrizio giustina (fgiust)
Assigned to: fabrizio giustina (fgiust)
Summary: Decorator support for indexed and mapped properties

Initial Comment:
(from a post to the displaytag user mailing list)

I am using displaytag with some complex beans and 
noticed that the 
hasGetterFor() method in 
org.displaytag.decorator.Decorator is less than 
perfect.  It checks for a complex property (using '.') but 
doesn't handle 
indexed or mapped properties (using value[int] or 'value
(key)'). 

Instead of using org.displaytag.util.LookupUtil, I decided 
to simply catch 
an exception when trying to access the property with 
org.apache.commons.beanutils.PropertyUtils.  If an 
exception is thrown, 
the property isn't there, and false is returned.  Else, 
hasGetterFor 
returns true.  The result is cached just like before, so I 
don't believe a 
performance hit is an issue. 

I didn't look at refactoring the code to take this into 
account. 
Decorator.hasGetterFor() may be superfluous if this 
approach is taken. 

Patch is attached and also follows inline. 

Chris Eldredge 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=926213&group_id=73068


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to