Update of /cvsroot/displaytag/display09/src/org/displaytag/decorator
In directory sc8-pr-cvs1:/tmp/cvs-serv9444/src/org/displaytag/decorator

Modified Files:
        Decorator.java 
Log Message:
modified method hasGetterFor

Index: Decorator.java
===================================================================
RCS file: /cvsroot/displaytag/display09/src/org/displaytag/decorator/Decorator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Decorator.java      15 Jul 2003 21:49:24 -0000      1.3
--- Decorator.java      20 Jul 2003 21:35:26 -0000      1.4
***************
*** 93,97 ****
  
        /**
!        * Check if a getter exists for a given property. Uses cached info if property 
has already been requested
         * @param pPropertyName name of the property to check
         * @return boolean true if the decorator has a getter for the given property
--- 93,99 ----
  
        /**
!        * Check if a getter exists for a given property. Uses cached info if property 
has already been requested.
!        * This method only check for a simple property, if pPropertyName contains 
multiple tokens only the first part is
!        * evaluated
         * @param pPropertyName name of the property to check
         * @return boolean true if the decorator has a getter for the given property
***************
*** 99,105 ****
        public boolean hasGetterFor(String pPropertyName)
        {
                Boolean lCachedResult;
  
!               if ((lCachedResult = (Boolean) lPropertyMap.get(pPropertyName)) != 
null)
                {
                        return lCachedResult.booleanValue();
--- 101,115 ----
        public boolean hasGetterFor(String pPropertyName)
        {
+               String lSimpleProperty = pPropertyName;
+ 
+               // get the simple (not nested) bean property
+               if ((lSimpleProperty != null) && (lSimpleProperty.indexOf(".") > 0))
+               {
+                       lSimpleProperty = lSimpleProperty.substring(0, 
lSimpleProperty.indexOf("."));
+               }
+ 
                Boolean lCachedResult;
  
!               if ((lCachedResult = (Boolean) lPropertyMap.get(lSimpleProperty)) != 
null)
                {
                        return lCachedResult.booleanValue();
***************
*** 107,114 ****
  
                // not already cached... check
!               boolean lHasGetter = searchGetterFor(pPropertyName);
  
                // save in cache
!               lPropertyMap.put(pPropertyName, new Boolean(lHasGetter));
  
                // and return
--- 117,124 ----
  
                // not already cached... check
!               boolean lHasGetter = searchGetterFor(lSimpleProperty);
  
                // save in cache
!               lPropertyMap.put(lSimpleProperty, new Boolean(lHasGetter));
  
                // and return




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to