Modules In Swiz

10 views
Skip to first unread message

Srividhya

unread,
Sep 20, 2010, 9:03:59 AM9/20/10
to Swiz Framework
Hi ,

We are doing an enterprise application and we use RC1 version of Swiz
and Flex4 with the modules.The modules are getting loaded locally ,but
its not getting loaded in the server. We could not find out what the
reason is . Please help me ASAP .

Main App :

<swiz:Swiz>
<swiz:beanProviders>
<config:Beans/>
</swiz:beanProviders>
<swiz:config>
<swiz:SwizConfig
eventPackages="com.iw.events.*,com.iw.module.admin.events.*"
viewPackages="com.iw.view.*,com.iw.module.admin.view.*"/>
</swiz:config>
</swiz:Swiz>


Main Config Bean:
------------------------

<delegates:AuthenticateDelegate id="authenticateDelegate"/>
<delegates:TemplateDelegate id="templateDelegate"/>
<controller:AuthenticateController id="authenticateController"/>
<controller:DynamicFormController id="dynamicFormController"/>
<delegates:ServiceLocator id="serviceLocator"/>
<model:GDS_V2_Model id="applicationModel"/>
<manager:ConnectionManager id="connectionManager"/>
<swiz:ServiceHelper id="serviceHelp"/>

Module App:
-----------------

<swiz:Swiz>
<swiz:config>
<swiz:SwizConfig
eventPackages="com.iw.module.admin.events.*,com.iw.events.*"
viewPackages="com.iw.module.admin.view.*,com.iw.view.*"/>
</swiz:config>
<swiz:beanProviders>
<config:AdminBeans/>
</swiz:beanProviders>
</swiz:Swiz>
</fx:Declarations>
<view1:AdminMainView width="100%" height="100%"/>

Module Config Bean:
-----------------------------

<mediator:AdminMainviewMediator id="adminMainviewMediator"/>
<admindelegates:ProjectDelegate id="projectDelegate"/>
<admindelegates:CompanyDelegate id="companyDelegate"/>
<admindelegates:UserDelegate id="userDelegate"/>
<admindelegates:RoleDelegate id="roleDelegate"/>
<admindelegates:CategoryDelegate id="categoryDelegate"/>
<admindelegates:TeamDelegate id="teamDelegate"/>
<admindelegates:RelationshipDelegate id="relationshipDelegate"/>
<admincontroller:AdminController id="adminController"/>


As you can see , we are using a passing view pattern . If we remove
the Admin main view and Admin main view mediator and add them in the
module app , its working fine .

Any suggestions?

ben.clin...@gmail.com

unread,
Sep 20, 2010, 11:16:41 AM9/20/10
to swiz-fr...@googlegroups.com
Swiz is not involved in the actual loading of modules. I would suggest asking for assistance on flexcoders.

Ben





--
You received this message because you are subscribed to the Google Groups "Swiz Framework" group.
To post to this group, send email to swiz-fr...@googlegroups.com.
To unsubscribe from this group, send email to swiz-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swiz-framework?hl=en.


Srividhya

unread,
Sep 21, 2010, 11:07:44 AM9/21/10
to Swiz Framework
Hi Ben ,

Actually the issue is , if we give all the controllers , delegates in
the main config Beans.mxml , the module gets loaded, but if we split
the delegates and controllers involved in module to the module
configBeans, ihe events are not triggered.Any idea, why this is
happening?

Thx in advance.

Sri

On Sep 20, 8:16 pm, "ben.clinkinbe...@gmail.com"
> > swiz-framewor...@googlegroups.com<swiz-framework%2Bunsubscribe@go oglegroups.com>
> > .

Brian Kotek

unread,
Sep 21, 2010, 2:12:17 PM9/21/10
to swiz-fr...@googlegroups.com
The first issue you always want to look at when dealing with modules is an application domain issue. Any classes that are compiled into the main application but are not in the application domain of the module cannot be located. So try making sure that the classes you want to use in the module are actually compiled into the module.

To unsubscribe from this group, send email to swiz-framewor...@googlegroups.com.

Srividhya

unread,
Sep 22, 2010, 10:00:20 AM9/22/10
to Swiz Framework
Sorry to disturb you guys, As I am relatively new to Flex , I could
not get the details, explained by Brian. Could anyone detail it
please.

Thanks in advance

Sri

On Sep 21, 11:12 pm, Brian Kotek <brian...@gmail.com> wrote:
> The first issue you always want to look at when dealing with modules is an
> application domain issue. Any classes that are compiled into the main
> application but are not in the application domain of the module cannot be
> located. So try making sure that the classes you want to use in the module
> are actually compiled into the module.
>
> > > > swiz-framewor...@googlegroups.com<swiz-framework%2Bunsu...@googlegroups.com>
> > <swiz-framework%2Bunsubscribe@go oglegroups.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/swiz-framework?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Swiz Framework" group.
> > To post to this group, send email to swiz-fr...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > swiz-framewor...@googlegroups.com<swiz-framework%2Bunsu...@googlegroups.com>

Brian Kotek

unread,
Sep 22, 2010, 10:41:25 AM9/22/10
to swiz-fr...@googlegroups.com
Well it is actually a pretty deep topic so I will give you a few links. But the basic message is that when you compile a Flex application, the compiler strips out any classes that are not actually referenced in your application. It does this for optimization reasons. Which means that if Module A wants to use Controller A and Controller B, then you must have references to both of those controller classes in Module A. An easy way to do this is to just create a variable that it typed to those classes somewhere inside Module A:

private var tempControllerA : TempControllerA;
private var tempControllerB : TempControllerB;


Much more info at:




To unsubscribe from this group, send email to swiz-framewor...@googlegroups.com.

Brian Kotek

unread,
Sep 22, 2010, 10:44:25 AM9/22/10
to swiz-fr...@googlegroups.com
Also, to be honest, if you're new to Flex you may not want to be messing with Modules yet, as their nuances can sometimes be a challenge for even seasoned Flex developers. 


On Wed, Sep 22, 2010 at 10:43 AM, Brian Kotek <bria...@gmail.com> wrote:
I should also note I'm not positive that a domain issue is the cause of your problem. Just that domain issues are OFTEN the cause of MOST module problems that have to do with classes not being found by the module.

Brian Kotek

unread,
Sep 22, 2010, 10:43:04 AM9/22/10
to swiz-fr...@googlegroups.com
I should also note I'm not positive that a domain issue is the cause of your problem. Just that domain issues are OFTEN the cause of MOST module problems that have to do with classes not being found by the module.
On Wed, Sep 22, 2010 at 10:41 AM, Brian Kotek <bria...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages