Hi again,
This time I'm having troubles while trying to inject a constant value into an object ...
First, I have a class in the default package (ok, I know, it's no good practice) anyway, here is the constant definition :
I am trying to inject the ERROR constant into a string property of an object :Code:package { public class Notifications { public static const ERROR:String = "error"; } }
This way it works. But I had to use a "targetField" field property while I was expecting to use a "staticField" like written in the documentation.Code:<object id="myObject" class="org.ozb.SomeObject" scope="singleton" autowire="byType"> <property name="stringValue"> <object class="org.springextensions.actionscript.ioc.factory.config.FieldRetrievingFactoryObject"> <property name="targetClass" value="Notifications"/> <property name="targetField" value="ERROR"/> </object> </property> </object>
Ok, this is a minor issue.
Now, the real issue : I'm trying to use the util namespace to achieve the same result but I can't get it to work !
I have added the namespace definition and the namespace handler (like in doc)
I have used the following flavors without any success :
I have an error at context creation.Code:<!-- DOES NOT WORK --> <util:constant static-field="Notifications.ERROR"/> <!-- DOES NOT WORK --> <util:constant target-class="Notifications" target-field="ERROR"/> <!-- DOES NOT WORK --> <util:constant target-class="Notifications" static-field="ERROR"/>
Help appreciated
thanks in advance


Reply With Quote