Skip to content

Commit

Permalink
merged with swiz branch
Browse files Browse the repository at this point in the history
  • Loading branch information
srohde committed Mar 12, 2010
2 parents bc53661 + 3e7913e commit a3589c9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/Beans.mxml
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<swiz:BeanProvider xmlns:swiz="http://swiz.swizframework.org"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:model="org.swizframework.example.model.*"
xmlns:ctrl="org.swizframework.example.ctrl.*">

<model:AppModel/>
<ctrl:AppController/>

</swiz:BeanProvider>
7 changes: 6 additions & 1 deletion src/Swiz1Basic.mxml
Expand Up @@ -4,7 +4,12 @@
xmlns:mx="library://ns.adobe.com/flex/mx">

<fx:Declarations>

<swiz:SwizConfig id="config" xmlns:swiz="http://swiz.swizframework.org"
viewPackages="org.swizframework.example.view"
eventPackages="org.swizframework.example.event"/>
<swiz:Swiz xmlns:swiz="http://swiz.swizframework.org"
config="{config}"
beanProviders="{[Beans]}"/>
</fx:Declarations>

<view:AppView horizontalCenter="0"
Expand Down
2 changes: 2 additions & 0 deletions src/org/swizframework/example/ctrl/AppController.as
Expand Up @@ -8,12 +8,14 @@ package org.swizframework.example.ctrl
public class AppController
{

[Inject]
public var model:AppModel;

public function AppController()
{
}

[Mediate(event="MessageEvent.MESSAGE", properties="message")]
public function handleMessage(message:String):void
{
model.message = message;
Expand Down
1 change: 1 addition & 0 deletions src/org/swizframework/example/view/MessageResultView.mxml
Expand Up @@ -12,6 +12,7 @@
import org.swizframework.example.model.AppModel;
[Bindable]
[Inject]
public var model:AppModel;
]]>
</fx:Script>
Expand Down

0 comments on commit a3589c9

Please sign in to comment.