[ http://issues.apache.org/jira/browse/TAPESTRY-558?page=comments#action_12318764 ]
Howard M. Lewis Ship commented on TAPESTRY-558: ----------------------------------------------- I'm afraid you've fallen prey to a misconception about how property names map to method names. When the first two characters of the method name, after "get" or "set", are both upper case, then the case is maintained as is. Thus getJFreeChartService() maps to a property named "JFreeChartService". The error reporting here could be better. What's happened is that the <inject> element causes a getJFreeChartService() method to be created, but claims property "jFreeChartService". Later, the abstract property enhancement worker stumbles across the getJFreeChartService() method and determines that it is associated with an unclaimed property, "JFreeChartService", so it attempts to add the property itself. <inject property="JFreeChartService" object="engine-service:jfreechart"/> should do the trick. > <inject> raises duplicate method exception when dealing with 'xName' named > properties > ------------------------------------------------------------------------------------- > > Key: TAPESTRY-558 > URL: http://issues.apache.org/jira/browse/TAPESTRY-558 > Project: Tapestry > Type: Bug > Components: Framework > Versions: 4.0 > Reporter: Vjeran Marcinko > Assignee: Howard M. Lewis Ship > > When I try to inject service into some page/component property by : > <inject property="chartService" object="engine-service:jfreechart"/> > everything works fine since property name is 'chartService', but when I use > properties that start with name that has only first letter in lower case, > such as 'jFreeChartService': > <inject property="jFreeChartService" object="engine-service:jfreechart"/> > it raises exception: > org.apache.hivemind.ApplicationRuntimeException > Unable to add method org.apache.tapestry.engine.IEngineService > getJFreeChartService() to class $JFreeChartImage_17: duplicate method: > getJFreeChartService > It happens for all getters that look like: > getJChart(); > getDService(); > .... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
