[ 
https://issues.apache.org/jira/browse/TOMAHAWK-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479602
 ] 

Zdenek Sochor commented on TOMAHAWK-928:
----------------------------------------

Hi,
 the patch won't solve other issues:

a) getMethod introspection call returns only public methods 
(getDeclaredMethod() returns protected methods too)

b) if getter is in "is" form, getMethod() will walk through all superclasses 
1st for "get" form finding nothing, then trying the same approach for "is" form 
and this could be a huge performance hit in deep class hiearchy.

so little more work on patch will be needed, it would require little insight of 
more common uses of components.

I suggest trying finding methods by calling getDeclaredMethod() for both forms 
1st and then if no method found try to use getMethod() calls.

Zdenek

> DojoUtils.getAttributeMap fails for subclassed Dojo Components
> --------------------------------------------------------------
>
>                 Key: TOMAHAWK-928
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-928
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.5-SNAPSHOT
>            Reporter: Stefan Schuster
>         Assigned To: Werner Punz
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: DojoUtils.patch
>
>
> When using DojoUtils.renderWidgetInitializationCode() with a String Array as 
> arguments parameter introspection get's used to find the getters for the 
> given Strings. When subclassing a dojo based widget this mechanisms fails 
> with a NoSuchMethodException.
> The introspection happens in DojoUtils.getAttributeMap() and uses 
> Class.getDeclaredMethod() instead of Class.getMethod() which won't find the 
> inherited getters. Changing this makes the mechanism working with subclassed 
> components too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to