Updated Branches:
  refs/heads/develop 7b3260229 -> 8e96bb9bc

Fixing these tests to work properly with the new-ish dependency resolving (I 
think, not really sure when the old behaviour changed).

Signed-off-by: Erik de Bruin <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/e2b5a131
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/e2b5a131
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/e2b5a131

Branch: refs/heads/develop
Commit: e2b5a131e89f96b08a3e3db69ab1bf46c83e8d09
Parents: 7b32602
Author: Erik de Bruin <[email protected]>
Authored: Sat Nov 9 01:38:20 2013 +0100
Committer: Erik de Bruin <[email protected]>
Committed: Sat Nov 9 01:38:20 2013 +0100

----------------------------------------------------------------------
 .../codegen/js/flexjs/TestFlexJSFile.java       |   4 +-
 .../test-files/flexjs/files/MyController.as     |  92 ---------------
 .../flexjs/files/MyController_result.js         | 112 -------------------
 .../test-files/flexjs/files/MyModel.as          |  59 ----------
 .../test-files/flexjs/files/MyModel_result.js   |  63 -----------
 .../flexjs/files/StockDataJSONItemConverter.js  |  26 +++++
 .../flexjs/files/controllers/MyController.as    |  92 +++++++++++++++
 .../files/controllers/MyController_result.js    | 112 +++++++++++++++++++
 .../test-files/flexjs/files/models/MyModel.as   |  59 ++++++++++
 .../flexjs/files/models/MyModel_result.js       |  63 +++++++++++
 10 files changed, 354 insertions(+), 328 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
----------------------------------------------------------------------
diff --git 
a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
 
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
index 9e2fae4..4524844 100644
--- 
a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
+++ 
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFile.java
@@ -56,7 +56,7 @@ public class TestFlexJSFile extends FlexJSTestBase
     @Test
     public void testFlexJSMyController()
     {
-        String fileName = "MyController";
+        String fileName = "controllers/MyController";
 
         IFileNode node = compileAS(fileName, true,
                 "test-files"
@@ -74,7 +74,7 @@ public class TestFlexJSFile extends FlexJSTestBase
     @Test
     public void testFlexJSMyModel()
     {
-        String fileName = "MyModel";
+        String fileName = "models/MyModel";
 
         IFileNode node = compileAS(fileName, true, "test-files"
                 + File.separator + "flexjs" + File.separator + "files", false);

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/test-files/flexjs/files/MyController.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyController.as 
b/compiler.jx.tests/test-files/flexjs/files/MyController.as
deleted file mode 100644
index d7b0547..0000000
--- a/compiler.jx.tests/test-files/flexjs/files/MyController.as
+++ /dev/null
@@ -1,92 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package controllers
-{
-       import org.apache.flex.core.Application;
-       import org.apache.flex.core.IDocument;
-       import org.apache.flex.events.Event;
-       
-       
-       import models.MyModel;
-       
-       public class MyController implements IDocument
-       {
-               public function MyController(app:Application = null)
-               {
-                       if (app)
-                       {
-                               this.app = app as FlexJSTest_again;
-                               app.addEventListener("viewChanged", 
viewChangeHandler);
-                       }
-               }
-               
-               private var queryBegin:String = 
"http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22";
-               private var queryEnd:String = 
"%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env&format=json";
-               private var app:FlexJSTest_again;
-               
-               private function viewChangeHandler(event:Event):void
-               {
-                       app.initialView.addEventListener("buttonClicked", 
buttonClickHandler);
-                       app.initialView.addEventListener("listChanged", 
listChangedHandler);
-                       app.initialView.addEventListener("cityListChanged", 
cityListChangeHandler);
-                       app.initialView.addEventListener("transferClicked", 
transferClickHandler);
-                       app.initialView.addEventListener("comboBoxChanged", 
comboBoxChangeHandler);
-               }
-               
-               private function buttonClickHandler(event:Event):void
-               {
-                       var sym:String = MyInitialView(app.initialView).symbol;
-                       app.service.url = queryBegin + sym + queryEnd;
-                       app.service.send();
-                       app.service.addEventListener("complete", 
completeHandler);
-               }
-               
-               private function completeHandler(event:Event):void
-               {
-                       MyModel(app.model).labelText = 
app.collection.getItemAt(0) as String;
-               }
-               
-               private function listChangedHandler(event:Event):void
-               {
-                       MyModel(app.model).labelText = 
MyInitialView(app.initialView).symbol;
-               }
-               
-               private function cityListChangeHandler(event:Event):void
-               {
-                       MyModel(app.model).labelText = 
MyInitialView(app.initialView).city;
-               }
-               
-               private function transferClickHandler(event:Event):void
-               {
-                       MyModel(app.model).labelText = 
MyInitialView(app.initialView).inputText;
-               }
-               
-               private function comboBoxChangeHandler(event:Event):void
-               {
-                       MyModel(app.model).labelText = 
MyInitialView(app.initialView).comboBoxValue;
-               }
-               
-               public function setDocument(document:Object, id:String = 
null):void
-               {
-                       this.app = document as FlexJSTest_again;
-                       app.addEventListener("viewChanged", viewChangeHandler);
-               }
-               
-       }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/test-files/flexjs/files/MyController_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyController_result.js 
b/compiler.jx.tests/test-files/flexjs/files/MyController_result.js
deleted file mode 100644
index c80f220..0000000
--- a/compiler.jx.tests/test-files/flexjs/files/MyController_result.js
+++ /dev/null
@@ -1,112 +0,0 @@
-goog.provide('controllers.MyController');
-
-/**
- * @constructor
- * @implements {org.apache.flex.core.IDocument}
- * @param {org.apache.flex.core.Application=} app
- */
-controllers.MyController = function(app) {
-       app = typeof app !== 'undefined' ? app : null;
-       if (app) {
-               this.app = org.apache.flex.utils.Language.as(app, 
FlexJSTest_again);
-               app.addEventListener("viewChanged", 
goog.bind(this.viewChangeHandler, this));
-       }
-};
-
-/**
- * @private
- * @type {string}
- */
-controllers.MyController.prototype.queryBegin = 
"http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22";
-
-/**
- * @private
- * @type {string}
- */
-controllers.MyController.prototype.queryEnd = 
"%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env&format=json";
-
-/**
- * @private
- * @type {FlexJSTest_again}
- */
-controllers.MyController.prototype.app;
-
-/**
- * @private
- * @param {org.apache.flex.events.Event} event
- */
-controllers.MyController.prototype.viewChangeHandler = function(event) {
-       this.app.initialView.addEventListener("buttonClicked", 
goog.bind(this.buttonClickHandler, this));
-       this.app.initialView.addEventListener("listChanged", 
goog.bind(this.listChangedHandler, this));
-       this.app.initialView.addEventListener("cityListChanged", 
goog.bind(this.cityListChangeHandler, this));
-       this.app.initialView.addEventListener("transferClicked", 
goog.bind(this.transferClickHandler, this));
-       this.app.initialView.addEventListener("comboBoxChanged", 
goog.bind(this.comboBoxChangeHandler, this));
-};
-
-/**
- * @private
- * @param {org.apache.flex.events.Event} event
- */
-controllers.MyController.prototype.buttonClickHandler = function(event) {
-       var /** @type {string} */ sym = this.app.initialView/** Cast to 
MyInitialView */.get_symbol();
-       this.app.get_service().set_url(this.queryBegin + sym + this.queryEnd);
-       this.app.get_service().send();
-       this.app.get_service().addEventListener("complete", 
goog.bind(this.completeHandler, this));
-};
-
-/**
- * @private
- * @param {org.apache.flex.events.Event} event
- */
-controllers.MyController.prototype.completeHandler = function(event) {
-       this.app.model/** Cast to models.MyModel 
*/.set_labelText(org.apache.flex.utils.Language.as(this.app.get_collection().getItemAt(0),
 String));
-};
-
-/**
- * @private
- * @param {org.apache.flex.events.Event} event
- */
-controllers.MyController.prototype.listChangedHandler = function(event) {
-       this.app.model/** Cast to models.MyModel 
*/.set_labelText(this.app.initialView/** Cast to MyInitialView */.get_symbol());
-};
-
-/**
- * @private
- * @param {org.apache.flex.events.Event} event
- */
-controllers.MyController.prototype.cityListChangeHandler = function(event) {
-       this.app.model/** Cast to models.MyModel 
*/.set_labelText(this.app.initialView/** Cast to MyInitialView */.get_city());
-};
-
-/**
- * @private
- * @param {org.apache.flex.events.Event} event
- */
-controllers.MyController.prototype.transferClickHandler = function(event) {
-       this.app.model/** Cast to models.MyModel 
*/.set_labelText(this.app.initialView/** Cast to MyInitialView 
*/.get_inputText());
-};
-
-/**
- * @private
- * @param {org.apache.flex.events.Event} event
- */
-controllers.MyController.prototype.comboBoxChangeHandler = function(event) {
-       this.app.model/** Cast to models.MyModel 
*/.set_labelText(this.app.initialView/** Cast to MyInitialView 
*/.get_comboBoxValue());
-};
-
-/**
- * @expose
- * @param {Object} document
- * @param {string=} id
- */
-controllers.MyController.prototype.setDocument = function(document, id) {
-       id = typeof id !== 'undefined' ? id : null;
-       this.app = org.apache.flex.utils.Language.as(document, 
FlexJSTest_again);
-       this.app.addEventListener("viewChanged", 
goog.bind(this.viewChangeHandler, this));
-};
-
-/**
- * @const
- */
-controllers.MyController.prototype.FLEXJS_CLASS_INFO = { interfaces: 
[org.apache.flex.core.IDocument] };
-

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/test-files/flexjs/files/MyModel.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyModel.as 
b/compiler.jx.tests/test-files/flexjs/files/MyModel.as
deleted file mode 100644
index 1dc23e6..0000000
--- a/compiler.jx.tests/test-files/flexjs/files/MyModel.as
+++ /dev/null
@@ -1,59 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package models
-{
-       import org.apache.flex.events.Event;
-       import org.apache.flex.events.EventDispatcher;
-       
-       public class MyModel extends EventDispatcher
-       {
-               public function MyModel()
-               {
-               }
-               
-               private var _labelText:String;
-               
-               public function get labelText():String
-               {
-                       return _labelText;
-               }
-               
-               public function set labelText(value:String):void
-               {
-                       if (value != _labelText)
-                       {
-                               _labelText = value;
-                               dispatchEvent(new Event("labelTextChanged"));
-                       }
-               }
-        
-        private var _strings:Array = ["AAPL", "ADBE", "GOOG", "MSFT", "YHOO"];
-        public function get strings():Array
-        {
-            return _strings;
-        }
-               
-               private var _cities:Array = ["London", "Miami", "Paris", 
"Sydney", "Tokyo"];
-               public function get cities():Array
-               {
-                       return _cities;
-               }
-
-       }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/test-files/flexjs/files/MyModel_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyModel_result.js 
b/compiler.jx.tests/test-files/flexjs/files/MyModel_result.js
deleted file mode 100644
index 38422d6..0000000
--- a/compiler.jx.tests/test-files/flexjs/files/MyModel_result.js
+++ /dev/null
@@ -1,63 +0,0 @@
-goog.provide('models.MyModel');
-
-/**
- * @constructor
- * @extends {org.apache.flex.events.EventDispatcher}
- */
-models.MyModel = function() {
-       goog.base(this);
-}
-goog.inherits(models.MyModel, org.apache.flex.events.EventDispatcher);
-
-/**
- * @private
- * @type {string}
- */
-models.MyModel.prototype._labelText;
-
-/**
- * @expose
- * @return {string}
- */
-models.MyModel.prototype.get_labelText = function() {
-       return this._labelText;
-};
-
-/**
- * @expose
- * @param {string} value
- */
-models.MyModel.prototype.set_labelText = function(value) {
-       if (value != this._labelText) {
-               this._labelText = value;
-               this.dispatchEvent(new 
org.apache.flex.events.Event("labelTextChanged"));
-       }
-};
-
-/**
- * @private
- * @type {Array}
- */
-models.MyModel.prototype._strings = ["AAPL", "ADBE", "GOOG", "MSFT", "YHOO"];
-
-/**
- * @expose
- * @return {Array}
- */
-models.MyModel.prototype.get_strings = function() {
-       return this._strings;
-};
-
-/**
- * @private
- * @type {Array}
- */
-models.MyModel.prototype._cities = ["London", "Miami", "Paris", "Sydney", 
"Tokyo"];
-
-/**
- * @expose
- * @return {Array}
- */
-models.MyModel.prototype.get_cities = function() {
-       return this._cities;
-};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js
----------------------------------------------------------------------
diff --git 
a/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js 
b/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js
new file mode 100644
index 0000000..48b4f00
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js
@@ -0,0 +1,26 @@
+goog.provide('StockDataJSONItemConverter');
+
+goog.require('org.apache.flex.net.JSONItemConverter');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.net.JSONItemConverter}
+ */
+StockDataJSONItemConverter = function() {
+       goog.base(this);
+}
+goog.inherits(StockDataJSONItemConverter, 
org.apache.flex.net.JSONItemConverter);
+
+/**
+ * @expose
+ * @param {string} data
+ * @return {Object}
+ * @override
+ */
+StockDataJSONItemConverter.prototype.convertItem = function(data) {
+       var /** @type {Object} */ obj = goog.base(this, 'convertItem', data);
+       if (obj["query"]["count"] == 0)
+               return "No Data";
+       obj = obj["query"]["results"]["quote"];
+       return obj;
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/test-files/flexjs/files/controllers/MyController.as
----------------------------------------------------------------------
diff --git 
a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController.as 
b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController.as
new file mode 100644
index 0000000..d7b0547
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController.as
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package controllers
+{
+       import org.apache.flex.core.Application;
+       import org.apache.flex.core.IDocument;
+       import org.apache.flex.events.Event;
+       
+       
+       import models.MyModel;
+       
+       public class MyController implements IDocument
+       {
+               public function MyController(app:Application = null)
+               {
+                       if (app)
+                       {
+                               this.app = app as FlexJSTest_again;
+                               app.addEventListener("viewChanged", 
viewChangeHandler);
+                       }
+               }
+               
+               private var queryBegin:String = 
"http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22";
+               private var queryEnd:String = 
"%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env&format=json";
+               private var app:FlexJSTest_again;
+               
+               private function viewChangeHandler(event:Event):void
+               {
+                       app.initialView.addEventListener("buttonClicked", 
buttonClickHandler);
+                       app.initialView.addEventListener("listChanged", 
listChangedHandler);
+                       app.initialView.addEventListener("cityListChanged", 
cityListChangeHandler);
+                       app.initialView.addEventListener("transferClicked", 
transferClickHandler);
+                       app.initialView.addEventListener("comboBoxChanged", 
comboBoxChangeHandler);
+               }
+               
+               private function buttonClickHandler(event:Event):void
+               {
+                       var sym:String = MyInitialView(app.initialView).symbol;
+                       app.service.url = queryBegin + sym + queryEnd;
+                       app.service.send();
+                       app.service.addEventListener("complete", 
completeHandler);
+               }
+               
+               private function completeHandler(event:Event):void
+               {
+                       MyModel(app.model).labelText = 
app.collection.getItemAt(0) as String;
+               }
+               
+               private function listChangedHandler(event:Event):void
+               {
+                       MyModel(app.model).labelText = 
MyInitialView(app.initialView).symbol;
+               }
+               
+               private function cityListChangeHandler(event:Event):void
+               {
+                       MyModel(app.model).labelText = 
MyInitialView(app.initialView).city;
+               }
+               
+               private function transferClickHandler(event:Event):void
+               {
+                       MyModel(app.model).labelText = 
MyInitialView(app.initialView).inputText;
+               }
+               
+               private function comboBoxChangeHandler(event:Event):void
+               {
+                       MyModel(app.model).labelText = 
MyInitialView(app.initialView).comboBoxValue;
+               }
+               
+               public function setDocument(document:Object, id:String = 
null):void
+               {
+                       this.app = document as FlexJSTest_again;
+                       app.addEventListener("viewChanged", viewChangeHandler);
+               }
+               
+       }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
----------------------------------------------------------------------
diff --git 
a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js 
b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
new file mode 100644
index 0000000..c80f220
--- /dev/null
+++ 
b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
@@ -0,0 +1,112 @@
+goog.provide('controllers.MyController');
+
+/**
+ * @constructor
+ * @implements {org.apache.flex.core.IDocument}
+ * @param {org.apache.flex.core.Application=} app
+ */
+controllers.MyController = function(app) {
+       app = typeof app !== 'undefined' ? app : null;
+       if (app) {
+               this.app = org.apache.flex.utils.Language.as(app, 
FlexJSTest_again);
+               app.addEventListener("viewChanged", 
goog.bind(this.viewChangeHandler, this));
+       }
+};
+
+/**
+ * @private
+ * @type {string}
+ */
+controllers.MyController.prototype.queryBegin = 
"http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22";
+
+/**
+ * @private
+ * @type {string}
+ */
+controllers.MyController.prototype.queryEnd = 
"%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env&format=json";
+
+/**
+ * @private
+ * @type {FlexJSTest_again}
+ */
+controllers.MyController.prototype.app;
+
+/**
+ * @private
+ * @param {org.apache.flex.events.Event} event
+ */
+controllers.MyController.prototype.viewChangeHandler = function(event) {
+       this.app.initialView.addEventListener("buttonClicked", 
goog.bind(this.buttonClickHandler, this));
+       this.app.initialView.addEventListener("listChanged", 
goog.bind(this.listChangedHandler, this));
+       this.app.initialView.addEventListener("cityListChanged", 
goog.bind(this.cityListChangeHandler, this));
+       this.app.initialView.addEventListener("transferClicked", 
goog.bind(this.transferClickHandler, this));
+       this.app.initialView.addEventListener("comboBoxChanged", 
goog.bind(this.comboBoxChangeHandler, this));
+};
+
+/**
+ * @private
+ * @param {org.apache.flex.events.Event} event
+ */
+controllers.MyController.prototype.buttonClickHandler = function(event) {
+       var /** @type {string} */ sym = this.app.initialView/** Cast to 
MyInitialView */.get_symbol();
+       this.app.get_service().set_url(this.queryBegin + sym + this.queryEnd);
+       this.app.get_service().send();
+       this.app.get_service().addEventListener("complete", 
goog.bind(this.completeHandler, this));
+};
+
+/**
+ * @private
+ * @param {org.apache.flex.events.Event} event
+ */
+controllers.MyController.prototype.completeHandler = function(event) {
+       this.app.model/** Cast to models.MyModel 
*/.set_labelText(org.apache.flex.utils.Language.as(this.app.get_collection().getItemAt(0),
 String));
+};
+
+/**
+ * @private
+ * @param {org.apache.flex.events.Event} event
+ */
+controllers.MyController.prototype.listChangedHandler = function(event) {
+       this.app.model/** Cast to models.MyModel 
*/.set_labelText(this.app.initialView/** Cast to MyInitialView */.get_symbol());
+};
+
+/**
+ * @private
+ * @param {org.apache.flex.events.Event} event
+ */
+controllers.MyController.prototype.cityListChangeHandler = function(event) {
+       this.app.model/** Cast to models.MyModel 
*/.set_labelText(this.app.initialView/** Cast to MyInitialView */.get_city());
+};
+
+/**
+ * @private
+ * @param {org.apache.flex.events.Event} event
+ */
+controllers.MyController.prototype.transferClickHandler = function(event) {
+       this.app.model/** Cast to models.MyModel 
*/.set_labelText(this.app.initialView/** Cast to MyInitialView 
*/.get_inputText());
+};
+
+/**
+ * @private
+ * @param {org.apache.flex.events.Event} event
+ */
+controllers.MyController.prototype.comboBoxChangeHandler = function(event) {
+       this.app.model/** Cast to models.MyModel 
*/.set_labelText(this.app.initialView/** Cast to MyInitialView 
*/.get_comboBoxValue());
+};
+
+/**
+ * @expose
+ * @param {Object} document
+ * @param {string=} id
+ */
+controllers.MyController.prototype.setDocument = function(document, id) {
+       id = typeof id !== 'undefined' ? id : null;
+       this.app = org.apache.flex.utils.Language.as(document, 
FlexJSTest_again);
+       this.app.addEventListener("viewChanged", 
goog.bind(this.viewChangeHandler, this));
+};
+
+/**
+ * @const
+ */
+controllers.MyController.prototype.FLEXJS_CLASS_INFO = { interfaces: 
[org.apache.flex.core.IDocument] };
+

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/test-files/flexjs/files/models/MyModel.as
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/models/MyModel.as 
b/compiler.jx.tests/test-files/flexjs/files/models/MyModel.as
new file mode 100644
index 0000000..1dc23e6
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/files/models/MyModel.as
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package models
+{
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.EventDispatcher;
+       
+       public class MyModel extends EventDispatcher
+       {
+               public function MyModel()
+               {
+               }
+               
+               private var _labelText:String;
+               
+               public function get labelText():String
+               {
+                       return _labelText;
+               }
+               
+               public function set labelText(value:String):void
+               {
+                       if (value != _labelText)
+                       {
+                               _labelText = value;
+                               dispatchEvent(new Event("labelTextChanged"));
+                       }
+               }
+        
+        private var _strings:Array = ["AAPL", "ADBE", "GOOG", "MSFT", "YHOO"];
+        public function get strings():Array
+        {
+            return _strings;
+        }
+               
+               private var _cities:Array = ["London", "Miami", "Paris", 
"Sydney", "Tokyo"];
+               public function get cities():Array
+               {
+                       return _cities;
+               }
+
+       }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e2b5a131/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js 
b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
new file mode 100644
index 0000000..38422d6
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
@@ -0,0 +1,63 @@
+goog.provide('models.MyModel');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.events.EventDispatcher}
+ */
+models.MyModel = function() {
+       goog.base(this);
+}
+goog.inherits(models.MyModel, org.apache.flex.events.EventDispatcher);
+
+/**
+ * @private
+ * @type {string}
+ */
+models.MyModel.prototype._labelText;
+
+/**
+ * @expose
+ * @return {string}
+ */
+models.MyModel.prototype.get_labelText = function() {
+       return this._labelText;
+};
+
+/**
+ * @expose
+ * @param {string} value
+ */
+models.MyModel.prototype.set_labelText = function(value) {
+       if (value != this._labelText) {
+               this._labelText = value;
+               this.dispatchEvent(new 
org.apache.flex.events.Event("labelTextChanged"));
+       }
+};
+
+/**
+ * @private
+ * @type {Array}
+ */
+models.MyModel.prototype._strings = ["AAPL", "ADBE", "GOOG", "MSFT", "YHOO"];
+
+/**
+ * @expose
+ * @return {Array}
+ */
+models.MyModel.prototype.get_strings = function() {
+       return this._strings;
+};
+
+/**
+ * @private
+ * @type {Array}
+ */
+models.MyModel.prototype._cities = ["London", "Miami", "Paris", "Sydney", 
"Tokyo"];
+
+/**
+ * @expose
+ * @return {Array}
+ */
+models.MyModel.prototype.get_cities = function() {
+       return this._cities;
+};
\ No newline at end of file

Reply via email to