[ 
http://issues.apache.org/jira/browse/TAPESTRY-725?page=comments#action_12363683 
] 

Davor Hrg commented on TAPESTRY-725:
------------------------------------

I just run into the sam problem,

I use inject in the page specification, but belive the
the cause is the same.



> @InjectObject is unable to inject configurations as Map
> -------------------------------------------------------
>
>          Key: TAPESTRY-725
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-725
>      Project: Tapestry
>         Type: Bug
>   Components: Annotations
>     Versions: 4.0
>  Environment: 4.0b11
>     Reporter: Norbert Sándor

>
> I have a configuration point which can be retrieved as a Map:
> <configuration-point id="ObjectVisualizers">
> <schema>
> <element name="visualizer" key-attribute="type">
> <attribute name="type" required="true" translator="class"/>
> <attribute name="implementation" required="true" translator="object" />
> <rules>
> <push-attribute attribute="implementation"/>
> <invoke-parent method="addElement"/>
> </rules>
> </element>
> </schema>
> </configuration-point>
> Hivemind handles it correctly as Registry.getConfigurationAsMap() returns the 
> expected value.
> But
> @InjectObject(value="configuration:mymodule.ObjectVisualizers")
> public abstract Map getObjectVisualizers();
> results in an exception:
> org.apache.tapestry.BindingException
> An error occured processing annotation 
> @org.apache.tapestry.annotations.InjectObject(value=configuration:mymodule.ObjectVisualizers)
>  of public abstract java.util.Map mypackage.Component.getObjectVisualizers(): 
> The value obtained using locator 'configuration:mymodule.ObjectVisualizers' 
> ([...]) is not compatible with the existing property (of type java.util.Map).
> because as I see InjectObjectWorker does not check the property type, so 
> injecting a configuration is allowed only as a List.
> BR,
> Norbi

-- 
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]

Reply via email to