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 6020675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:36:11+00:00 2026-05-23T03:36:11+00:00

I am developing an application in Flex using the cairngorm module library and Parsley.

  • 0

I am developing an application in Flex using the cairngorm module library and Parsley.

Parsley documentation chapter 5 says: “Interceptors may come in handy when you want to decide whether or not the message should be passed to handlers”.

When using the ModuleMessageInterceptor the above is not true. Which means that my MessageHandler receive the message before the MessageInterceptor.

Does anyone knows a work around?

Regards,

Fadi

  • 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-23T03:36:12+00:00Added an answer on May 23, 2026 at 3:36 am

    The solution to this problem was extending the ModuleMessageInterceptor class as follows:

    package fr.core.patch.cairngorm
    {
        import com.adobe.cairngorm.module.ModuleIdMetadata;
        import com.adobe.cairngorm.module.ModuleMessageDispatcher;
        import com.adobe.cairngorm.module.ModuleMessageInterceptor;
        import com.adobe.cairngorm.module.ParsleyModuleMessage;
    
        import flash.system.ApplicationDomain;
    
        import org.spicefactory.lib.reflect.ClassInfo;
        import org.spicefactory.lib.reflect.Property;
        import org.spicefactory.parsley.core.registry.ObjectDefinitionRegistry;
        import org.spicefactory.parsley.core.registry.RootObjectDefinition;
        import org.spicefactory.parsley.tag.messaging.MessageHandlerDecorator;
        import org.spicefactory.parsley.tag.messaging.MessageInterceptorDecorator;
    
        public class ATPModuleMessageInterceptor extends ModuleMessageInterceptor
        {
            public function ATPModuleMessageInterceptor()
            {
                super();
            }
    
            public var order:int;
    
            private var target:Property;
    
            override public function process(registry:ObjectDefinitionRegistry):void
            {
                target=getModuleIdTargetProperty(registry.domain);
    
                var interceptor:MessageInterceptorDecorator=new MessageInterceptorDecorator();
                interceptor.type=type;
                interceptor.selector=selector;
                interceptor.method="interceptModuleMessage";
                interceptor.order = order;
    
                var messageHandler:MessageHandlerDecorator=new MessageHandlerDecorator();
                messageHandler.type=ParsleyModuleMessage;
                messageHandler.method="parsleyModuleMessageHandler";
    
                var definition:RootObjectDefinition=registry.builders.forRootDefinition(ModuleMessageDispatcher).decorators([interceptor, messageHandler]).buildAndRegister();
    
                definition.constructorArgs.addValue(target);
    
                if (moduleRef)
                {
                    definition.constructorArgs.addIdReference(moduleRef);
                }
            }
    
            private function getModuleIdTargetProperty(domain:ApplicationDomain):Property
            {
                var props:Array=ClassInfo.forClass(type, domain).getProperties();
    
                for each (var prop:Property in props)
                {
                    if (prop.hasMetadata(ModuleIdMetadata))
                    {
                        return prop;
                    }
                }
    
                return null;
            }
        }
    }
    

    By doing the above we have added the order property to the ModuleMessageInterceptor which solve the problem I had.

    Regards,

    Fadi Mansour

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a Flex application and am having some trouble working with asynchronous calls.
I'm developing a flex application to view charts and statistic data about real-time stock
We´re developing an ASP MVC application witch the View (aspx) has a Flex embed.
I am developing a Flex application in which I would like to simulate roughly
I am currently developing an application using the Flashbuilder 4.5 framework and I am
I am developing application for iPhone environment for 1 year from now,In a recent
I have heard that when developing application which uses a database you should do
I developing an application, in which i working with database manipulation. The method i
I am developing a mobile application in Adobe Flash builder 4.5. I want to
I'm developping an Adobe Flex application. I need to detect gps devices when plugged.

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.