Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6543477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:21:04+00:00 2026-05-25T11:21:04+00:00

In my parsley container, I’m instantiating an object ‘A’ that contains a Dictionary (flash.utils.Dictionary).

  • 0

In my parsley container, I’m instantiating an object ‘A’ that contains a Dictionary (flash.utils.Dictionary).

I would like to create this Dictionary using parsley and inject it to ‘A’.
This dictionary pairs structure is: key=id of object ‘B’, value=’B’
where object ‘B’ is also an object which is defined and created using parsley
(so basically the pairs structure is and object id as a key and the object itself as the value).

Now, I have no problem creating ‘A’ and ‘B’, but can’t seem to find the right way to create this dictionary using parsley, nor injecting it to ‘A’.

Any help is highly appreciated!

Thanks in advance,
Yogev

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:21:05+00:00Added an answer on May 25, 2026 at 11:21 am

    You can do this in the context.mxml:

    <mx:Object xmlns:mx="http://www.adobe.com/2006/mxml" 
               xmlns="http://www.spicefactory.org/parsley">
    
        <mx:Script>
                <![CDATA[
                    import com.example.ObjectToInjectX; 
                    import com.example.ObjectToInjectY;
                    import com.example.MyExampleObject;
    
                ]]>
        </mx:Script>
    
        <!-- The class to inject the map into, just declare -->
        <Object type="{MyExampleObject}" id="myExampleObject" />
    
        <!-- Objects to inject into the Dictionary -->
        <Object type="{ObjectToInjectX}" id="objectToInjectX" />
        <Object type="{ObjectToInjectY}" id="objectToInjectY" />
    
        <!-- The Dictionary -->
        <Object type="{Dictionary} id="myDictionaryToInject" />
            <DynamicProperty name="itemX" idRef="objectToInjectX" />
            <DynamicProperty name="itemY" idRef="objectToInjectY" />
        </Object>
    
    </mx:Object> 
    

    Then simply in the class you want to inject to do the following:

    public class MyExampleObject
    {
         private var _myDictionaryToInject:Dictionary;
    
         [Inject(id="myDictionaryToInject")]
         public function set myDictionaryToInject( myDictionaryToInject:Dictionary ):void
         {
                _myDictionaryToInject = myDictionaryToInject;
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a puzzler. Relevant Environment: Flex app, running parsley, which gets built by
I heared the cairngorm is not a framework and parsely framework is inbuilt(IOC container).
I am trying to use parsley framework in my flex application. Messaging System is
I am developing an application in Flex using the cairngorm module library and Parsley.
I was wondering if Parsley framework is compatible for Flex Hero Mobile 4.5? I
i'm looking for a possibility to log messages in my flex 4.5 Project. This
I know already so many questions have been asked here on this error #2025
I'm using Parsley in my flex mobile project. I have multiple destination services but
I have Flex/Parsley/Blazeds application deployed on weblogic 9.x. The following error appears in the
I needed some guidance on how to use FlexUnit 4 within Flash Builder, to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.