Announcement Announcement Module
No announcement yet.
problem with CairngormFrontController Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • problem with CairngormFrontController


    i'm trying to configure Cairn. front controller in application context file (according to Chapter 3. in documentation). But i can't get it to work - when i dispatch event, nothing happens (proper command should be fired)
    this is my context file:
    <object id="frontController" class="org.springextensions.actionscript.cairngorm.control.CairngormFrontController">
    		    <!-- Add a new property for each event/command mapping: -->
    		    <property name="GetUsersEvent" value="GetUsersCommand"/>
        	<constructor-arg value="pl.ivmx.uaprototype.client.control.commands"/>
        	<!-- Add a custom command factory instance -->
    		<method-invocation name="addCommandFactory">
    	<object id="businessDelegateFactory" class="">
    	  <property name="service" ref="lowendManager"/>
    	  <property name="delegateClass" type="class" value=""/>
        <object id="appAwareCmdFactory" class="pl.ivmx.uaprototype.client.control.commands.ApplicationModelAwareCommandFactory">
    		<property name="applicationModel" ref="lowendModelLocator"/>
    		<method-invocation name="addBusinessDelegateFactory">
    	        <value type="Class">pl.ivmx.uaprototype.client.control.commands.GetUsersCommand</value>
        <object id="lowendModelLocator" class="pl.ivmx.uaprototype.client.model.LowendModelLocator" singleton="true" />
    	<object id="flexServiceBase" class="" singleton="true" >
    		<property name="channelSet" ref="channelSet"/>
    	<object id="lowendManager" class="" singleton="true" parent="flexServiceBase"/>
    	<object id="amfChannel" class="mx.messaging.channels.AMFChannel">
    		<constructor-arg value="my-amf"/>
    		<!-- TODO: move url value to properties file -->
    		<constructor-arg value=""/>
    		<property name="pollingEnabled" value="false"/>
    	<object id="channelSet" class="mx.messaging.ChannelSet">
    		<method-invocation name="addChannel">
    GetUsersCommand should by excecuted after GetUsersEvent is dispatched - but it isn't

    The rest is done according to Chapter 3..ofcourse GetUsersEvent class extends SASCairngormEvent and is dispatched after FlexXMLApplicationContext has been initialized..please, help, I have no idea what is wrong..

    using flex sdk 3.4, cairngorm 2.2.1, sas 0.8.1

  • #2
    wrong event class

    Hey there,

    I'm pretty sure the problem is that you're using SASCairngormEvent in a non-module situation. SASCairngormEvent is meant for multi-module scenario's, if you're in a regular Application than just inherit from CairngormEvent.

    You can read all about it in this documentation section: frontcontroller

    I guess the naming of SASCairngormEvent is wrong, I will rename it to SASCaingormModuleEvent, that will prevent future confusion.