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

  • problem with CairngormFrontController

    hi,

    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:
    Code:
    <object id="frontController" class="org.springextensions.actionscript.cairngorm.control.CairngormFrontController">
    		<constructor-arg>
    		  <object>
    		    <!-- Add a new property for each event/command mapping: -->
    		    <property name="GetUsersEvent" value="GetUsersCommand"/>
    		  </object>
    		</constructor-arg>
        	<constructor-arg value="pl.ivmx.uaprototype.client.control.commands"/>
        	<!-- Add a custom command factory instance -->
    		<method-invocation name="addCommandFactory">
    			<arg><ref>appAwareCmdFactory</ref></arg>
    		</method-invocation>    	
    	</object>
    	
    	<object id="businessDelegateFactory" class="org.springextensions.actionscript.cairngorm.business.BusinessDelegateFactory">
    	  <property name="service" ref="lowendManager"/>
    	  <property name="delegateClass" type="class" value="pl.ivmx.uaprototype.client.business.delegates.LowendDelegate"/>
    	</object>
    	
        <object id="appAwareCmdFactory" class="pl.ivmx.uaprototype.client.control.commands.ApplicationModelAwareCommandFactory">
    		<property name="applicationModel" ref="lowendModelLocator"/>
    		<method-invocation name="addBusinessDelegateFactory">
    	    <arg>
    	      <ref>businessDelegateFactory</ref>
    	    </arg>
    	    <arg>
    	      <array>
    	        <value type="Class">pl.ivmx.uaprototype.client.control.commands.GetUsersCommand</value>
    	      </array>
    	    </arg>
    	  </method-invocation>		
    	</object>
    	
        <object id="lowendModelLocator" class="pl.ivmx.uaprototype.client.model.LowendModelLocator" singleton="true" />
        
    	<object id="flexServiceBase" class="pl.ivmx.uaprototype.client.business.FlexServiceBase" singleton="true" >
    		<property name="channelSet" ref="channelSet"/>
    	</object>
    	<object id="lowendManager" class="pl.ivmx.uaprototype.client.business.LowendManager" 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>
    	<object id="channelSet" class="mx.messaging.ChannelSet">
    		<method-invocation name="addChannel">
    			<arg><ref>amfChannel</ref></arg>
    		</method-invocation>
    	</object>
    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:

    http://www.springactionscript.org/docs/reference/html/extensions-documentation.html#module_support_in_the_cairngorm frontcontroller


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

    cheers,

    Roland

    Comment

    Working...
    X