This project is read-only.


ControllerManager must be created and must have the Controllers dictionary and the views dictionary filled.
ControllerManager can be created using Spring.NET DI framework. Since the controller manager is created by spring.net, its entire dictionary can be automatically injected.

The listing 3 bellow shows how to create the ControllerManager and its entire dependencies using spring.net statements.
<?xml version="1.0" encoding="utf-8" ?>

<objects xmlns="http://www.springframework.net">

  <import resource="spring-Koossery.MVCwin.Tuto_VIEWS.xml"/>

  <!—Configuring Controllers-->
  
  <object id="LoginController" type="Koossery.MVCwin.Tuto.App_Code.controllers.LoginController">
    <property name="Session">
      <ref object="Session"/>
    </property>
    <property name="AsynchMethods">
      <list element-type="System.String">
        <value>Login</value>
      </list>
    </property>
  </object>
  
  <!—Controller Manager-->
  <object id="ControleurManager" type="Koossery.MVCwin.ControllerManager.impl.ControllerManager, Koossery.MVCwin">
    <property name="DefaultController">
      <value>LoginController</value>
    </property>

    <!--Controllers-->
    <property name="Controllers">
      <dictionary key-type="string" value-type="Koossery.MVCwin.Controller.itf.IController, Koossery.MVCwin">
        <entry key="LoginController">
          <ref object="LoginController"/>
        </entry>
      </dictionary>
    </property>

    <!--Views-->
    <property name="Views">
      <dictionary key-type="string" value-type="Koossery.MVCwin.Views.itf.IView, Koossery.MVCwin">
        <entry key="LoginView">
          <ref object="LoginView"/>
        </entry>
      </dictionary>
    </property>
  </object>
</objects>

The ControllerManager is ready and have its entire dictionary filled by the appropriate controller and views

Last edited Jun 9, 2009 at 7:58 AM by koossery, version 1

Comments

No comments yet.