flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject svn commit: r1444389 - in /flex/asjs/branches/develop: examples/FlexJSTest_again/ examples/FlexJSTest_again/controllers/ examples/FlexJSTest_again/models/ frameworks/as/ frameworks/as/src/ frameworks/as/src/org/apache/flex/binding/ frameworks/as/src/or...
Date Sat, 09 Feb 2013 16:11:45 GMT
Author: aharui
Date: Sat Feb  9 16:11:44 2013
New Revision: 1444389

URL: http://svn.apache.org/r1444389
Log:
FlexJSTest now calls HTTPService to get a stock quote.

Added:
    flex/asjs/branches/develop/examples/FlexJSTest_again/StockDataJSONItemConverter.as   (with props)
    flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/binding/ConstantBinding.as   (with props)
    flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as   (with props)
    flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.as   (with props)
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js   (with props)
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js   (with props)
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.js   (with props)
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js   (with props)
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js   (with props)
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js   (with props)
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js   (with props)
Modified:
    flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml
    flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml
    flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as
    flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as
    flex/asjs/branches/develop/examples/FlexJSTest_again/models/MyModel.as
    flex/asjs/branches/develop/frameworks/as/manifest.xml
    flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as
    flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/core/Application.as
    flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/List.as
    flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/HTTPService.as
    flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/JSONInputParser.as
    flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextButtonBead.js
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextFieldBead.js
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/TextModel.js
    flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js

Modified: flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml (original)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml Sat Feb  9 16:11:44 2013
@@ -22,7 +22,7 @@ limitations under the License.
 				   xmlns:basic="library://ns.apache.org/flexjs/basic" 
 				   xmlns:models="models.*" 
 				   xmlns:controllers="controllers.*"
-				   initialize="model.labelText='Hello World'"
+				   initialize="MyModel(model).labelText='Hello World'"
 				   >
 	<basic:valuesImpl>
 		<local:MySimpleValuesImpl />
@@ -36,4 +36,16 @@ limitations under the License.
 	<basic:controller>
 		<controllers:MyController />
 	</basic:controller>
+    <basic:beads>
+        <basic:HTTPService id="service">
+            <basic:LazyCollection id="collection">
+                <basic:inputParser>
+                    <basic:JSONInputParser />
+                </basic:inputParser>
+                <basic:itemConverter>
+                    <local:StockDataJSONItemConverter />
+                </basic:itemConverter> 
+            </basic:LazyCollection>
+        </basic:HTTPService>
+    </basic:beads>
 </basic:Application>
\ No newline at end of file

Modified: flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml (original)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml Sat Feb  9 16:11:44 2013
@@ -20,6 +20,14 @@ limitations under the License.
 <basic:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:basic="library://ns.apache.org/flexjs/basic" 
 			   >
+    <fx:Script>
+        <![CDATA[            
+            public function get symbol():String
+            {
+                return list.selectedItem as String;
+            }
+        ]]>
+    </fx:Script>
 	<basic:Label id="lbl" x="100" y="25" >
 		<basic:beads>
 			<basic:SimpleBinding eventName="labelTextChanged"
@@ -29,4 +37,12 @@ limitations under the License.
 		</basic:beads>
 	</basic:Label>
 	<basic:TextButton text="OK" x="100" y="75" click="dispatchEvent(new Event('buttonClicked'))" />
+    <basic:List id="list" x="200" y="25" width="100" height="200" change="dispatchEvent(new Event('listChanged'))">
+        <basic:beads>
+            <basic:ConstantBinding
+                                 sourceID="applicationModel"
+                                 sourcePropertyName="strings"
+                                 destinationPropertyName="dataProvider" />
+        </basic:beads>
+    </basic:List>
 </basic:ViewBase>

Modified: flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as (original)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as Sat Feb  9 16:11:44 2013
@@ -23,13 +23,15 @@ package 
 	import org.apache.flex.core.SimpleValuesImpl;
 	import org.apache.flex.html.staticControls.beads.TextButtonBead;
 	import org.apache.flex.html.staticControls.beads.TextFieldBead;
-	import org.apache.flex.html.staticControls.beads.models.TextModel;
+	import org.apache.flex.html.staticControls.beads.models.ArraySelectionModel;
+    import org.apache.flex.html.staticControls.beads.models.TextModel;
 	
 	public class MySimpleValuesImpl extends SimpleValuesImpl
 	{
 		public function MySimpleValuesImpl()
 		{
 			values = { 
+                ISelectionModel: ArraySelectionModel,
 				ITextButtonBead: TextButtonBead,
 				ITextBead: TextFieldBead,
 				ITextModel: TextModel				

Added: flex/asjs/branches/develop/examples/FlexJSTest_again/StockDataJSONItemConverter.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/StockDataJSONItemConverter.as?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/examples/FlexJSTest_again/StockDataJSONItemConverter.as (added)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/StockDataJSONItemConverter.as Sat Feb  9 16:11:44 2013
@@ -0,0 +1,18 @@
+package
+{
+    import org.apache.flex.net.JSONItemConverter;
+    
+    public class StockDataJSONItemConverter extends JSONItemConverter
+    {
+        public function StockDataJSONItemConverter()
+        {
+            super();
+        }
+        
+        override public function convertItem(data:String):Object
+        {
+            var obj:Object = super.convertItem(data);
+            return obj.query.results.quote.Ask;
+        }
+    }
+}
\ No newline at end of file

Propchange: flex/asjs/branches/develop/examples/FlexJSTest_again/StockDataJSONItemConverter.as
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as (original)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as Sat Feb  9 16:11:44 2013
@@ -19,36 +19,54 @@
 package controllers
 {
 	import flash.events.Event;
-
-	import org.apache.flex.core.IDocument;
-	import org.apache.flex.core.Application;
 	
+	import org.apache.flex.core.Application;
+	import org.apache.flex.core.IDocument;
+    
+    import models.MyModel;
+    	
 	public class MyController implements IDocument
 	{
 		public function MyController(app:Application = null)
 		{
 			if (app)
 			{
-				this.app = app;
+				this.app = app as FlexJSTest;
 				app.addEventListener("viewChanged", viewChangeHandler);
 			}
 		}
 		
-		private var app:Application;
+        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;
 		
 		private function viewChangeHandler(event:Event):void
 		{
 			app.initialView.addEventListener("buttonClicked", buttonClickHandler);
+            app.initialView.addEventListener("listChanged", listChangedHandler);
 		}
 		
-		private function buttonClickHandler(event:Event):void
-		{
-			app.model.labelText = "Hello Universe";
-		}
-		
+        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;
+        }
+        
 		public function setDocument(document:Object, id:String = null):void
 		{
-			this.app = document as Application;
+			this.app = document as FlexJSTest;
 			app.addEventListener("viewChanged", viewChangeHandler);
 		}
 

Modified: flex/asjs/branches/develop/examples/FlexJSTest_again/models/MyModel.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/models/MyModel.as?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/examples/FlexJSTest_again/models/MyModel.as (original)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/models/MyModel.as Sat Feb  9 16:11:44 2013
@@ -18,8 +18,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 package models
 {
-	import flash.events.EventDispatcher;
 	import flash.events.Event;
+	import flash.events.EventDispatcher;
 	
 	public class MyModel extends EventDispatcher
 	{
@@ -42,5 +42,12 @@ package models
 				dispatchEvent(new Event("labelTextChanged"));
 			}
 		}
+        
+        private var _strings:Array = ["AAPL", "ADBE", "GOOG", "MSFT", "YHOO"];
+        public function get strings():Array
+        {
+            return _strings;
+        }
+
 	}
 }
\ No newline at end of file

Modified: flex/asjs/branches/develop/frameworks/as/manifest.xml
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/manifest.xml?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/manifest.xml (original)
+++ flex/asjs/branches/develop/frameworks/as/manifest.xml Sat Feb  9 16:11:44 2013
@@ -24,9 +24,15 @@
     <component id="Application" class="org.apache.flex.core.Application"/>
     <component id="SimpleValuesImpl" class="org.apache.flex.core.SimpleValuesImpl"/>
     <component id="ViewBase" class="org.apache.flex.core.ViewBase"/>
+    <component id="ConstantBinding" class="org.apache.flex.binding.ConstantBinding"/>
     <component id="SimpleBinding" class="org.apache.flex.binding.SimpleBinding"/>
     <component id="Button" class="org.apache.flex.html.staticControls.Button"/>
     <component id="Label" class="org.apache.flex.html.staticControls.Label"/>
     <component id="TextButton" class="org.apache.flex.html.staticControls.TextButton"/>
+    <component id="List" class="org.apache.flex.html.staticControls.List"/>
+    <component id="HTTPService" class="org.apache.flex.net.HTTPService"/>
+    <component id="LazyCollection" class="org.apache.flex.net.dataConverters.LazyCollection"/>
+    <component id="JSONInputParser" class="org.apache.flex.net.JSONInputParser"/>
+    <component id="JSONItemConverter" class="org.apache.flex.net.JSONItemConverter"/>
 
 </componentPackage>

Modified: flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as (original)
+++ flex/asjs/branches/develop/frameworks/as/src/FlexJSUIClasses.as Sat Feb  9 16:11:44 2013
@@ -32,6 +32,7 @@ internal class FlexJSUIClasses
 	import org.apache.flex.html.staticControls.beads.TextFieldBead; TextFieldBead;
 	import org.apache.flex.html.staticControls.beads.TextInputBead; TextInputBead;
 	import org.apache.flex.html.staticControls.beads.models.TextModel; TextModel;
+    import org.apache.flex.html.staticControls.beads.models.ArraySelectionModel; ArraySelectionModel;
 }
 
 }

Added: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/binding/ConstantBinding.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/binding/ConstantBinding.as?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/binding/ConstantBinding.as (added)
+++ flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/binding/ConstantBinding.as Sat Feb  9 16:11:44 2013
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.binding
+{
+	import flash.events.Event;
+	import flash.events.IEventDispatcher;
+	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IDocument;
+
+	public class ConstantBinding implements IBead, IDocument
+	{
+		public function ConstantBinding()
+		{
+		}
+		
+		protected var source:IEventDispatcher;
+		protected var document:IEventDispatcher;
+		protected var destination:Object;
+
+		public var sourceID:String;
+		public var sourcePropertyName:String;
+		public var destinationPropertyName:String;
+		
+		public function set strand(value:IStrand):void
+		{
+			destination = value;
+			source = document[sourceID] as IEventDispatcher;
+			destination[destinationPropertyName] = source[sourcePropertyName];
+		}
+		
+		public function setDocument(document:Object, id:String = null):void
+		{
+			this.document = document as IEventDispatcher;
+		}
+		
+	}
+}
\ No newline at end of file

Propchange: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/binding/ConstantBinding.as
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/core/Application.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/core/Application.as?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/core/Application.as (original)
+++ flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/core/Application.as Sat Feb  9 16:11:44 2013
@@ -19,9 +19,8 @@
 package org.apache.flex.core
 {
     import flash.display.Sprite;
-	import flash.display.StageAlign;
-	import flash.display.StageScaleMode;
-	
+    import flash.display.StageAlign;
+    import flash.display.StageScaleMode;
     import flash.events.Event;
     
     import org.apache.flex.utils.MXMLDataInterpreter;
@@ -35,7 +34,7 @@ package org.apache.flex.core
      */
     [Event(name="initialize", type="flash.events.Event")]
     
-    public class Application extends Sprite
+    public class Application extends Sprite implements IStrand
     {
         public function Application()
         {
@@ -72,12 +71,50 @@ package org.apache.flex.core
 
         public function get MXMLDescriptor():Array
         {
-        return null;
+            return null;
         }
 
     	public function get MXMLProperties():Array
         {
             return null;
         }
+        
+        // beads declared in MXML are added to the strand.
+        // from AS, just call addBead()
+        public var beads:Array;
+        
+        private var _beads:Vector.<IBead>;
+        public function addBead(bead:IBead):void
+        {
+            if (!_beads)
+                _beads = new Vector.<IBead>;
+            _beads.push(bead);
+            bead.strand = this;
+        }
+        
+        public function getBeadByType(classOrInterface:Class):IBead
+        {
+            for each (var bead:IBead in _beads)
+            {
+                if (bead is classOrInterface)
+                    return bead;
+            }
+            return null;
+        }
+        
+        public function removeBead(value:IBead):IBead	
+        {
+            var n:int = _beads.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var bead:IBead = _beads[i];
+                if (bead == value)
+                {
+                    _beads.splice(i, 1);
+                    return bead;
+                }
+            }
+            return null;
+        }
     }
 }
\ No newline at end of file

Modified: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/List.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/List.as?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/List.as (original)
+++ flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/List.as Sat Feb  9 16:11:44 2013
@@ -18,10 +18,26 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
+	import flash.events.Event;
+	
+	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IInitSkin;
+	import org.apache.flex.core.IItemRenderer;
+	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.ISelectionModel;
+	import org.apache.flex.core.ItemRendererClassFactory;
 	import org.apache.flex.core.UIBase;
+	import org.apache.flex.core.ValuesManager;
+	import org.apache.flex.html.staticControls.beads.IListBead;
+	import org.apache.flex.html.staticControls.beads.ListBead;
+	import org.apache.flex.html.staticControls.beads.TextItemRendererFactoryForArrayData;
+	import org.apache.flex.html.staticControls.beads.controllers.ItemRendererMouseController;
+	import org.apache.flex.html.staticControls.beads.controllers.ListSingleSelectionMouseController;
+	import org.apache.flex.html.staticControls.beads.layouts.NonVirtualVerticalScrollingLayout;
+	import org.apache.flex.html.staticControls.supportClasses.TextFieldItemRenderer;
 	
+    [Event("change", flash.events.Event)]
+    
 	/**
 	 *  Label probably should extend TextField directly,
 	 *  but the player's APIs for TextLine do not allow
@@ -36,7 +52,16 @@ package org.apache.flex.html.staticContr
 			super();
 		}
 		
-		public function get selectedIndex():int
+        public function get dataProvider():Object
+        {
+            return ISelectionModel(model).dataProvider;
+        }
+        public function set dataProvider(value:Object):void
+        {
+            ISelectionModel(model).dataProvider = value;
+        }
+
+        public function get selectedIndex():int
 		{
 			return ISelectionModel(model).selectedIndex;
 		}
@@ -56,10 +81,37 @@ package org.apache.flex.html.staticContr
 		
 		override public function initModel():void
 		{
+            if (getBeadByType(ISelectionModel) == null)
+                addBead(new (ValuesManager.valuesImpl.getValue("ISelectionModel")) as IBead);
 		}
 		
 		public function initSkin():void
 		{
-		}
+            // TODO: (aharui) remove later
+            if (getBeadByType(IListBead) == null)
+            {
+                var lb:ListBead = new ListBead();
+                addBead(lb);	
+                var irf:TextItemRendererFactoryForArrayData = new TextItemRendererFactoryForArrayData();
+                var ircf:ItemRendererClassFactory = new ItemRendererClassFactory();
+                ircf.createFunction = createTextItemRenderer;
+                irf.itemRendererFactory = ircf;
+                addBead(irf);
+                var ll:NonVirtualVerticalScrollingLayout = new NonVirtualVerticalScrollingLayout();
+                lb.addBead(ll);
+                var lmc:ListSingleSelectionMouseController = new ListSingleSelectionMouseController();
+                addBead(lmc);
+                
+            }
+		}
+        
+        private function createTextItemRenderer(parent:IItemRendererParent):IItemRenderer
+        {
+            var tfir:TextFieldItemRenderer = new TextFieldItemRenderer();
+            tfir.addBead(new ItemRendererMouseController());
+            tfir.height = 24;
+            return tfir;
+            
+        }
 	}
 }
\ No newline at end of file

Added: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as (added)
+++ flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as Sat Feb  9 16:11:44 2013
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.html.staticControls.beads
+{
+    import flash.display.DisplayObject;
+    import flash.events.Event;
+    
+    import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IItemRendererClassFactory;
+    import org.apache.flex.core.IItemRendererParent;
+    import org.apache.flex.core.ISelectionModel;
+    import org.apache.flex.core.IStrand;
+
+	public class TextItemRendererFactoryForArrayData implements IBead
+	{
+		public function TextItemRendererFactoryForArrayData()
+		{
+
+		}
+		
+		private var selectionModel:ISelectionModel;
+		
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+			var listBead:IListBead = value.getBeadByType(IListBead) as IListBead;
+			dataGroup = listBead.dataGroup;
+			selectionModel.addEventListener("dataProviderChange", dataProviderChangeHandler);
+			dataProviderChangeHandler(null);
+		}
+		
+        public var itemRendererFactory:IItemRendererClassFactory;
+        
+		public var dataGroup:IItemRendererParent;
+		
+		private function dataProviderChangeHandler(event:Event):void
+		{
+			var dp:Array = selectionModel.dataProvider as Array;
+			var n:int = dp.length; 
+			for (var i:int = 0; i < n; i++)
+			{
+				var tf:ITextItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ITextItemRenderer;
+                tf.index = i;
+				dataGroup.addChild(tf as DisplayObject);
+				tf.text = dp[i];
+			}			
+		}
+		
+	}
+}
\ No newline at end of file

Propchange: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/TextItemRendererFactoryForArrayData.as
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.as?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.as (added)
+++ flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.as Sat Feb  9 16:11:44 2013
@@ -0,0 +1,93 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.html.staticControls.beads.models
+{
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+	
+	import org.apache.flex.core.ISelectionModel;
+	import org.apache.flex.core.IStrand;
+		
+	public class ArraySelectionModel extends EventDispatcher implements ISelectionModel
+	{
+		public function ArraySelectionModel()
+		{
+		}
+
+		private var _strand:IStrand;
+		
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+		}
+		
+		private var _dataProvider:Object;
+        
+		public function get dataProvider():Object
+		{
+			return _dataProvider;
+		}
+		public function set dataProvider(value:Object):void
+		{
+            _dataProvider = value;
+			dispatchEvent(new Event("dataProviderChanged"));
+		}
+
+		private var _selectedIndex:int = -1;
+		
+		public function get selectedIndex():int
+		{
+			return _selectedIndex;
+		}
+		public function set selectedIndex(value:int):void
+		{
+			_selectedIndex = value;
+			_selectedString = (value == -1) ? null : (value < _dataProvider.length) ? _dataProvider[value] : null;
+			dispatchEvent(new Event("selectedIndexChanged"));			
+		}
+		private var _selectedString:String;
+		
+		public function get selectedItem():Object
+		{
+			return _selectedString;
+		}
+		public function set selectedItem(value:Object):void
+		{
+			selectedString = String(value);	
+		}
+		public function get selectedString():String
+		{
+			return _selectedString;
+		}
+		public function set selectedString(value:String):void
+		{
+			_selectedString = value;
+			var n:int = _dataProvider.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				if (_dataProvider[i] == value)
+				{
+					_selectedIndex = i;
+					break;
+				}
+			}
+			dispatchEvent(new Event("selectedItemChanged"));			
+		}
+	}
+}
\ No newline at end of file

Propchange: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.as
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/HTTPService.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/HTTPService.as?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/HTTPService.as (original)
+++ flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/HTTPService.as Sat Feb  9 16:11:44 2013
@@ -20,13 +20,16 @@ package org.apache.flex.net
 {
 	import flash.events.Event;
 	import flash.events.EventDispatcher;
+	import flash.events.IEventDispatcher;
 	import flash.net.URLLoader;
 	import flash.net.URLRequest;
 	
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IStrand;
     
-	public class HTTPService extends EventDispatcher implements IStrand
+    [DefaultProperty("beads")]
+    
+	public class HTTPService extends EventDispatcher implements IStrand, IBead
 	{
 		public function HTTPService()
 		{
@@ -61,6 +64,13 @@ package org.apache.flex.net
 			}
 		}
 		
+        private var _strand:IStrand;
+        
+        public function set strand(value:IStrand):void
+        {
+            _strand = value;
+        }
+
 		// beads declared in MXML are added to the strand.
 		// from AS, just call addBead()
 		public var beads:Array;

Modified: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/JSONInputParser.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/JSONInputParser.as?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/JSONInputParser.as (original)
+++ flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/net/JSONInputParser.as Sat Feb  9 16:11:44 2013
@@ -18,15 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.net
 {
-    import org.apache.flex.core.IBead;
-    import org.apache.flex.core.ISelectionModel;
-    import org.apache.flex.core.IStrand;
-    import org.apache.flex.core.UIBase;
-    import org.apache.flex.html.staticControls.beads.SingleLineBorderBead;
-    import org.apache.flex.html.staticControls.beads.models.SingleLineBorderModel;
-    import org.apache.flex.html.staticControls.supportClasses.Border;
-    import org.apache.flex.html.staticControls.supportClasses.NonVirtualDataGroup;
-
 	public class JSONInputParser implements IInputParser
 	{        
 		public function parseItems(s:String):Array

Modified: flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as (original)
+++ flex/asjs/branches/develop/frameworks/as/src/org/apache/flex/utils/MXMLDataInterpreter.as Sat Feb  9 16:11:44 2013
@@ -93,7 +93,7 @@ public class MXMLDataInterpreter
             {
                 if (comp is UIBase)
                     comp.addToParent(parent);
-                else
+                else if (comp is DisplayObject)
                     parent.addChild(comp as DisplayObject);
             }
             
@@ -246,13 +246,22 @@ public class MXMLDataInterpreter
         var id:String = null;
         
         m = data[i++]; // num props
+        var beadOffset:int = i + (m - 1) * 3;
+        if (beadOffset >= -1)
+            trace(beadOffset, data[beadOffset]);
+        if (m > 0 && data[beadOffset] == "beads")
+        {
+            m--;
+        }
+        else
+            beadOffset = -1;
         for (j = 0; j < m; j++)
         {
             name = data[i++];
             simple = data[i++];
             value = data[i++];
             if (simple == null)
-                value = generateMXMLArray(host, null, value as Array, false);
+                value = generateMXMLArray(host, null, value as Array, true);
             else if (simple == false)
                 value = generateMXMLObject(host, value as Array);
             if (name == "id")
@@ -262,6 +271,26 @@ public class MXMLDataInterpreter
             else
                 host[name] = value;
         }
+        if (beadOffset > -1)
+        {
+            name = data[i++];
+            simple = data[i++];
+            value = data[i++];
+            if (simple == null)
+                value = generateMXMLArray(host, null, value as Array, true);
+            else if (simple == false)
+                value = generateMXMLObject(host, value as Array);
+            else
+                host[name] = value;
+            var beads:Array = value as Array;
+            var l:int = beads.length;
+            for (var k:int = 0; k < l; k++)
+            {
+                var bead:IBead = beads[k] as IBead;
+                IStrand(host).addBead(bead);
+                bead.strand = host as IStrand;
+            }
+        }
         m = data[i++]; // num styles
         for (j = 0; j < m; j++)
         {
@@ -269,7 +298,7 @@ public class MXMLDataInterpreter
             simple = data[i++];
             value = data[i++];
             if (simple == null)
-                value = generateMXMLArray(host, null, value as Array, false);
+                value = generateMXMLArray(host, null, value as Array, true);
             else if (simple == false)
                 value = generateMXMLObject(host, value as Array);
             host[name] = value;
@@ -282,7 +311,7 @@ public class MXMLDataInterpreter
             simple = data[i++];
             value = data[i++];
             if (simple == null)
-                value = generateMXMLArray(host, null, value as Array, false);
+                value = generateMXMLArray(host, null, value as Array, true);
             else if (simple == false)
                 value = generateMXMLObject(host, value as Array);
             host[name] = value;

Added: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js (added)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js Sat Feb  9 16:11:44 2013
@@ -0,0 +1,76 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.binding.ConstantBinding');
+
+goog.require('org.apache.flex.FlexGlobal');
+goog.require('org.apache.flex.FlexObject');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.FlexObject}
+ */
+org.apache.flex.binding.ConstantBinding = function() {
+    org.apache.flex.FlexObject.call(this);
+};
+goog.inherits(
+    org.apache.flex.binding.ConstantBinding, org.apache.flex.FlexObject
+);
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.binding.ConstantBinding.prototype.destination = null;
+
+/**
+ * @expose
+ * @type {string}
+ */
+org.apache.flex.binding.ConstantBinding.prototype.destinationPropertyName = '';
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.binding.ConstantBinding.prototype.source = null;
+
+/**
+ * @expose
+ * @type {string}
+ */
+org.apache.flex.binding.ConstantBinding.prototype.sourcePropertyName = '';
+
+/**
+ * @this {org.apache.flex.binding.ConstantBinding}
+ * @param {object} value The strand (owner) of the bead.
+ */
+org.apache.flex.binding.ConstantBinding.prototype.set_strand = function(value) {
+    this.destination = value;
+    this.source = this.document[this.sourceID];
+
+    this.destination['set_' + this.destinationPropertyName](
+        this.source['get_' + this.sourcePropertyName]()
+    );
+};
+
+/**
+ * @this {org.apache.flex.binding.ConstantBinding}
+ * @param {object} document The MXML object.
+ * @param {string} id The id for the instance.
+ */
+org.apache.flex.binding.ConstantBinding.prototype.setDocument =
+                                                    function(document, id) {
+    this.document = document;
+};

Propchange: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js (original)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js Sat Feb  9 16:11:44 2013
@@ -34,6 +34,12 @@ org.apache.flex.core.Application = funct
      * @type {Array.<Object>}
      */
     this.queuedListeners_;
+
+    /**
+     * @private
+     * @type {Array}
+     */
+    this.strand;
 };
 goog.inherits(org.apache.flex.core.Application, org.apache.flex.FlexObject);
 
@@ -102,7 +108,7 @@ org.apache.flex.core.Application.prototy
         }
     }
 
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this, 
+    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
             this.get_MXMLProperties());
 
     org.apache.flex.core.ValuesManager.valuesImpl = this.valuesImpl;
@@ -136,3 +142,60 @@ org.apache.flex.core.Application.prototy
 org.apache.flex.core.Application.prototype.get_MXMLProperties = function() {
     return null;
 };
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.Application}
+ * @param {object} bead The new bead.
+ */
+org.apache.flex.core.Application.prototype.addBead = function(bead) {
+    if (!this.strand)
+        this.strand = [];
+    this.strand.push(bead);
+    if (typeof(bead.constructor.$implements) != 'undefined' &&
+        typeof(bead.constructor.$implements.IBeadModel != 'undefined'))
+        this.model = bead;
+    bead.set_strand(this);
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.Application}
+ * @param {object} classOrInterface The requested bead type.
+ * @return {object} The bead.
+ */
+org.apache.flex.core.Application.prototype.getBeadByType =
+                                    function(classOrInterface) {
+    var n;
+    n = this.strand.length;
+    for (var i = 0; i < n; i++)
+    {
+        var bead = strand[i];
+        if (bead instanceof classOrInterface)
+            return bead;
+        if (classOrInterface in bead.constructor.$implements)
+            return bead;
+    }
+    return null;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.Application}
+ * @param {object} bead The bead to remove.
+ * @return {object} The bead.
+ */
+org.apache.flex.core.Application.prototype.removeBead = function(bead) {
+    var n = this.strand.length;
+    for (var i = 0; i < n; i++)
+    {
+        var bead = strand[i];
+        if (bead == value)
+        {
+            this.strand.splice(i, 1);
+            return bead;
+        }
+    }
+    return null;
+};
+

Modified: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js (original)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js Sat Feb  9 16:11:44 2013
@@ -59,6 +59,8 @@ org.apache.flex.core.ViewBase.prototype.
  */
 org.apache.flex.core.ViewBase.prototype.initUI = function(model) {
     this.applicationModel = model;
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this, this.get_MXMLProperties());
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, this, this.get_MXMLDescriptor());
+    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
+            this.get_MXMLProperties());
+    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this,
+            this, this.get_MXMLDescriptor());
 };

Added: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js (added)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js Sat Feb  9 16:11:44 2013
@@ -0,0 +1,146 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.staticControls.List');
+
+goog.require('org.apache.flex.core.UIBase');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html.staticControls.List = function() {
+    org.apache.flex.core.UIBase.call(this);
+
+    /**
+     * @private
+     * @type {Array.<Object>}
+     */
+    this._dataProvider;
+
+};
+goog.inherits(
+    org.apache.flex.html.staticControls.List, org.apache.flex.core.UIBase
+);
+
+/**
+ * @override
+ * @this {org.apache.flex.html.staticControls.List}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.html.staticControls.List.prototype.addToParent = function(p) {
+    this.element = document.createElement('select');
+    this.element.onChange = org.apache.flex.FlexGlobal.createProxy(
+                this, this.changeHandler);
+    this.element.size = 5;
+                
+    p.appendChild(this.element);
+
+    this.positioner = this.element;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html.staticControls.List}
+ * @return {Array.<Object>} The collection of data.
+ */
+org.apache.flex.html.staticControls.List.prototype.get_dataProvider =
+function() {
+    return this._dataProvider;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html.staticControls.List}
+ * @param {Array.<Object>} value The text setter.
+ */
+org.apache.flex.html.staticControls.List.prototype.set_dataProvider =
+function(value) {
+    this._dataProvider = value;
+
+    var dp = this.element.options;
+    var n = dp.length;
+    for (var i = 0; i < n; i++)
+        dp.remove(0);
+
+    n = value.length;
+    for (i = 0; i < n; i++)
+    {
+        var opt = document.createElement('option');
+        opt.text = value[i];
+        dp.add(opt);
+    }
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html.staticControls.List}
+ * @return {int} The selected index.
+ */
+org.apache.flex.html.staticControls.List.prototype.get_selectedIndex =
+function() {
+    return this.element.selectedIndex;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html.staticControls.List}
+ * @param {int} value The selected index.
+ */
+org.apache.flex.html.staticControls.List.prototype.set_selectedIndex =
+function(value) {
+    this.element.selectedIndex = value;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html.staticControls.List}
+ * @return {Object} The selected item.
+ */
+org.apache.flex.html.staticControls.List.prototype.get_selectedItem =
+function() {
+    return this._dataProvider[this.element.selectedIndex];
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html.staticControls.List}
+ * @param {Object} value The selected item.
+ */
+org.apache.flex.html.staticControls.List.prototype.set_selectedItem =
+function(value) {
+
+    var dp = this._dataProvider;
+    var n = dp.length;
+    for (var i = 0; i < n; i++)
+    {
+        if (dp[i] == value)
+            break;
+    }
+    if (i < n)
+        this.element.selectedIndex = i;
+};
+
+/**
+ * @protected
+ * @this {org.apache.flex.html.staticControls.List}
+ * @return {Object} The selected item.
+ */
+org.apache.flex.html.staticControls.List.prototype.changeHandler =
+function() {
+    evt = document.createEvent('Event');
+    evt.initEvent('change', false, false);
+    this.element.dispatchEvent(evt);
+};
+

Propchange: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextButtonBead.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextButtonBead.js?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextButtonBead.js (original)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextButtonBead.js Sat Feb  9 16:11:44 2013
@@ -24,6 +24,6 @@ org.apache.flex.html.staticControls.bead
     org.apache.flex.FlexObject.call(this);
 };
 goog.inherits(
-    org.apache.flex.html.staticControls.beads.TextButtonBead, 
+    org.apache.flex.html.staticControls.beads.TextButtonBead,
     org.apache.flex.FlexObject
 );

Modified: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextFieldBead.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextFieldBead.js?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextFieldBead.js (original)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/TextFieldBead.js Sat Feb  9 16:11:44 2013
@@ -24,6 +24,6 @@ org.apache.flex.html.staticControls.bead
     org.apache.flex.FlexObject.call(this);
 };
 goog.inherits(
-    org.apache.flex.html.staticControls.beads.TextFieldBead, 
+    org.apache.flex.html.staticControls.beads.TextFieldBead,
     org.apache.flex.FlexObject
 );

Added: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.js?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.js (added)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.js Sat Feb  9 16:11:44 2013
@@ -0,0 +1,29 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.staticControls.beads.models.ArraySelectionModel');
+
+goog.require('org.apache.flex.FlexObject');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.FlexObject}
+ */
+org.apache.flex.html.staticControls.beads.ArraySelectionModel = function() {
+    org.apache.flex.FlexObject.call(this);
+};
+goog.inherits(
+    org.apache.flex.html.staticControls.beads.ArraySelectionModel,
+    org.apache.flex.FlexObject
+);

Propchange: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/ArraySelectionModel.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/TextModel.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/TextModel.js?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/TextModel.js (original)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/TextModel.js Sat Feb  9 16:11:44 2013
@@ -24,6 +24,6 @@ org.apache.flex.html.staticControls.bead
     org.apache.flex.FlexObject.call(this);
 };
 goog.inherits(
-    org.apache.flex.html.staticControls.beads.TextModel, 
+    org.apache.flex.html.staticControls.beads.TextModel,
     org.apache.flex.FlexObject
 );

Added: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js (added)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js Sat Feb  9 16:11:44 2013
@@ -0,0 +1,246 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.net.HTTPService');
+
+goog.require('org.apache.flex.FlexGlobal');
+goog.require('org.apache.flex.FlexObject');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.FlexObject}
+ */
+org.apache.flex.net.HTTPService = function() {
+    org.apache.flex.FlexObject.call(this);
+
+    /**
+     * @protected
+     * @type {String}
+     */
+    this._url;
+
+    /**
+     * @private
+     * @type {Array}
+     */
+    this.strand;
+
+    /**
+     * @private
+     * @type {XMLHttpRequest}
+     */
+    this.element;
+
+    this.element = new XMLHttpRequest();
+};
+goog.inherits(org.apache.flex.net.HTTPService, org.apache.flex.FlexObject);
+
+/**
+ * @this {org.apache.flex.net.HTTPService}
+ * @param {string} type The event type.
+ * @param {function(?): ?} fn The event handler.
+ */
+org.apache.flex.net.HTTPService.prototype.addEventListener =
+function(type, fn) {
+    if (typeof this.element.attachEvent == 'function') {
+        this.element.attachEvent(org.apache.flex.FlexGlobal.EventMap[type], fn);
+    } else if (typeof this.element.addEventListener == 'function') {
+        this.element.addEventListener(type, fn);
+    }
+};
+
+/**
+ * @this {org.apache.flex.net.HTTPService}
+ * @param {flash.events.Event} evt The event.
+ */
+org.apache.flex.net.HTTPService.prototype.dispatchEvent = function(evt) {
+    this.element.dispatchEvent(evt);
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @return {string} value The data.
+ */
+org.apache.flex.net.HTTPService.prototype.get_data = function() {
+    return this.element.responseText;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @return {string} value The url.
+ */
+org.apache.flex.net.HTTPService.prototype.get_url = function() {
+    return this._url;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @param {string} value The url to fetch.
+ */
+org.apache.flex.net.HTTPService.prototype.set_url = function(value) {
+    this._url = value;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ */
+org.apache.flex.net.HTTPService.prototype.send = function() {
+    this.element.onreadystatechange = org.apache.flex.FlexGlobal.createProxy(
+            this, this.progressHandler);
+    this.element.open("GET",this._url,false);
+    this.element.send();        
+};
+
+/**
+ * @protected
+ * @this {org.apache.flex.net.HTTPService}
+ */
+org.apache.flex.net.HTTPService.prototype.progressHandler = function() {
+    if (this.element.readyState == 4)
+    {
+        evt = document.createEvent('Event');
+        evt.initEvent('complete', true, true);
+        this.element.dispatchEvent(evt);
+    }
+};
+
+/**
+ * @expose
+ * @type {string}
+ */
+org.apache.flex.net.HTTPService.prototype.id;
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @return {string} The id.
+ */
+org.apache.flex.net.HTTPService.prototype.get_id = function() {
+    return this.id;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @param {object} value The new id.
+ */
+org.apache.flex.net.HTTPService.prototype.set_id = function(value) {
+    if (this.id != value)
+    {
+        this.id = value;
+        this.dispatchEvent(new Event('idChanged'));
+    }
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
+ * @param {object} value The new host.
+ */
+org.apache.flex.net.HTTPService.prototype.set_strand =
+function(value) {
+    if (this.strand != value)
+    {
+        this.strand = value;
+    }
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @param {object} bead The new bead.
+ */
+org.apache.flex.net.HTTPService.prototype.addBead = function(bead) {
+    if (!this.strand)
+        this.strand = [];
+    this.strand.push(bead);
+    if (typeof(bead.constructor.$implements) != 'undefined' &&
+        typeof(bead.constructor.$implements.IBeadModel != 'undefined'))
+        this.model = bead;
+    bead.set_strand(this);
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @param {object} classOrInterface The requested bead type.
+ * @return {object} The bead.
+ */
+org.apache.flex.net.HTTPService.prototype.getBeadByType =
+                                    function(classOrInterface) {
+    var n;
+    n = this.strand.length;
+    for (var i = 0; i < n; i++)
+    {
+        var bead = strand[i];
+        if (bead instanceof classOrInterface)
+            return bead;
+        if (classOrInterface in bead.constructor.$implements)
+            return bead;
+    }
+    return null;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @param {object} bead The bead to remove.
+ * @return {object} The bead.
+ */
+org.apache.flex.net.HTTPService.prototype.removeBead = function(bead) {
+    var n = this.strand.length;
+    for (var i = 0; i < n; i++)
+    {
+        var bead = strand[i];
+        if (bead == value)
+        {
+            this.strand.splice(i, 1);
+            return bead;
+        }
+    }
+    return null;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @return {Array} The array of descriptors.
+ */
+org.apache.flex.net.HTTPService.prototype.get_MXMLDescriptor = function() {
+    return null;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.HTTPService}
+ * @return {Array} The array of properties.
+ */
+org.apache.flex.net.HTTPService.prototype.get_MXMLProperties = function() {
+    return null;
+};
+
+/**
+ * @this {org.apache.flex.binding.SimpleBinding}
+ * @param {object} document The MXML object.
+ * @param {string} id The id for the instance.
+ */
+org.apache.flex.net.HTTPService.prototype.setDocument =
+                                                    function(document, id) {
+    this.document = document;
+
+};

Propchange: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js (added)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js Sat Feb  9 16:11:44 2013
@@ -0,0 +1,38 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.net.JSONInputParser');
+
+goog.require('org.apache.flex.FlexGlobal');
+goog.require('org.apache.flex.FlexObject');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.FlexObject}
+ */
+org.apache.flex.net.JSONInputParser = function() {
+    org.apache.flex.FlexObject.call(this);
+};
+goog.inherits(org.apache.flex.net.JSONInputParser, org.apache.flex.FlexObject);
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.JSONInputParser}
+ * @param {string} s The input string.
+ * @return {Array.<String>} The Array of unparsed objects.
+ */
+org.apache.flex.net.JSONInputParser.prototype.parseItems = function(s) {
+    return s.split('},');
+};

Propchange: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js (added)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js Sat Feb  9 16:11:44 2013
@@ -0,0 +1,39 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.net.JSONItemConverter');
+
+goog.require('org.apache.flex.FlexGlobal');
+goog.require('org.apache.flex.FlexObject');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.FlexObject}
+ */
+org.apache.flex.net.JSONItemConverter = function() {
+    org.apache.flex.FlexObject.call(this);
+};
+goog.inherits(org.apache.flex.net.JSONItemConverter,
+        org.apache.flex.FlexObject);
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.JSONItemConverter}
+ * @param {string} s The input string.
+ * @return {Object} The object.
+ */
+org.apache.flex.net.JSONItemConverter.prototype.convertItem = function(s) {
+    return JSON.parse(s);
+};

Propchange: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js?rev=1444389&view=auto
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js (added)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js Sat Feb  9 16:11:44 2013
@@ -0,0 +1,172 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.net.dataConverters.LazyCollection');
+
+goog.require('org.apache.flex.FlexGlobal');
+goog.require('org.apache.flex.FlexObject');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.FlexObject}
+ */
+org.apache.flex.net.dataConverters.LazyCollection = function() {
+    org.apache.flex.FlexObject.call(this);
+
+    /**
+     * @private
+     * @type {Object}
+     */
+    this._strand;
+
+    /**
+     * @private
+     * @type {Object}
+     */
+    this.data;
+
+    /**
+     * @private
+     * @type {Object}
+     */
+    this._inputParser;
+
+    /**
+     * @private
+     * @type {Object}
+     */
+
+    this._itemConverter;
+
+    /**
+     * @private
+     * @type {Object}
+     */
+    this.data;
+};
+goog.inherits(org.apache.flex.net.dataConverters.LazyCollection,
+                org.apache.flex.FlexObject);
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.HTTPService}
+ * @return {string} value The input parser.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.get_inputParser =
+function() {
+    return this._inputParser;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.HTTPService}
+ * @param {string} value The input parser.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.set_inputParser =
+function(value) {
+    this._inputParser = value;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.HTTPService}
+ * @return {string} value The input parser.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.get_itemConverter =
+function() {
+    return this._itemConverter;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.HTTPService}
+ * @param {string} value The input parser.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.set_itemConverter =
+function(value) {
+    this._itemConverter = value;
+};
+
+/**
+ * @expose
+ * @type {string}
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.id;
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
+ * @return {string} The id.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.get_id =
+function() {
+    return this.id;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
+ * @param {object} value The new id.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.set_id =
+function(value) {
+    if (this.id != value)
+    {
+        this.id = value;
+        // this.dispatchEvent(new Event('idChanged'));
+    }
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
+ * @param {object} value The new host.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.set_strand =
+function(value) {
+    if (this._strand != value)
+    {
+        this._strand = value;
+        this._strand.addEventListener('complete',
+            org.apache.flex.FlexGlobal.createProxy(
+                this, this.completeHandler));
+    }
+};
+
+/**
+ * @protected
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.completeHandler =
+function() {
+    var results = this._strand.get_data();
+    this._rawData = this._inputParser.parseItems(results);
+    this.data = [];
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
+ * @param {int} index The index in the collection.
+ * @return {object} An item in the collection.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.getItemAt =
+function(index) {
+    if (this.data[index] == undefined)
+    {
+        this.data[index] = this._itemConverter.convertItem(this._rawData[index]);
+    }
+    return this.data[index];
+};

Propchange: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js?rev=1444389&r1=1444388&r2=1444389&view=diff
==============================================================================
--- flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js (original)
+++ flex/asjs/branches/develop/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js Sat Feb  9 16:11:44 2013
@@ -46,9 +46,11 @@ org.apache.flex.utils.MXMLDataInterprete
         var value;
         var id;
 
-        var generateMXMLArray = org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
-        var generateMXMLObject = org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
-        
+        var generateMXMLArray =
+            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
+        var generateMXMLObject =
+            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
+
         m = data[i++]; // num props
         for (j = 0; j < m; j++)
         {
@@ -93,8 +95,10 @@ org.apache.flex.utils.MXMLDataInterprete
         if (typeof(recursive) == 'undefined')
             recursive = true;
 
-        var generateMXMLArray = org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
-        var generateMXMLObject = org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
+        var generateMXMLArray =
+            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
+        var generateMXMLObject =
+            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
 
         var comps = [];
 
@@ -224,13 +228,13 @@ org.apache.flex.utils.MXMLDataInterprete
                 comp.setStyle(name, value);
             }
             */
-            
+
             m = data[i++]; // num events
             for (j = 0; j < m; j++)
             {
                 name = data[i++];
                 value = data[i++];
-                comp.addEventListener(name, 
+                comp.addEventListener(name,
                     org.apache.flex.FlexGlobal.createProxy(document, value));
             }
 
@@ -238,7 +242,11 @@ org.apache.flex.utils.MXMLDataInterprete
             if (children)
             {
                 if (recursive)
-                    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(document, comp, children, recursive);
+                {
+                    self = org.apache.flex.utils.MXMLDataInterpreter;
+                    self.generateMXMLInstances(
+                    document, comp, children, recursive);
+                }
                 else
                     comp.setMXMLDescriptor(children);
             }
@@ -285,18 +293,27 @@ org.apache.flex.utils.MXMLDataInterprete
         var simple;
         var value;
         var id = null;
-        
-        var generateMXMLArray = org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
-        var generateMXMLObject = org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
+
+        var generateMXMLArray =
+            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
+        var generateMXMLObject =
+            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
 
         m = data[i++]; // num props
+        var beadOffset = i + (m - 1) * 3;
+        if (m > 0 && data[beadOffset] == 'beads')
+        {
+            m--;
+        }
+        else
+            beadOffset = -1;
         for (j = 0; j < m; j++)
         {
             name = data[i++];
             simple = data[i++];
             value = data[i++];
             if (simple == null)
-                value = generateMXMLArray(host, null, value, false);
+                value = generateMXMLArray(host, null, value, true);
             else if (simple == false)
                 value = generateMXMLObject(host, value);
             if (name == 'id')
@@ -311,6 +328,31 @@ org.apache.flex.utils.MXMLDataInterprete
                     host[name] = value;
             }
         }
+        if (beadOffset > -1)
+        {
+            name = data[i++];
+            simple = data[i++];
+            value = data[i++];
+            if (simple == null)
+                value = generateMXMLArray(host, null, value, true);
+            else if (simple == false)
+                value = generateMXMLObject(host, value);
+            else
+            {
+            if (typeof(host['set_' + name]) == 'function')
+                host['set_' + name](value);
+            else
+                host[name] = value;
+            }
+            var beads = value;
+            var l = beads.length;
+            for (var k = 0; k < l; k++)
+            {
+                var bead = beads[k];
+                host.addBead(bead);
+            }
+        }
+
         m = data[i++]; // num styles
         for (j = 0; j < m; j++)
         {
@@ -318,7 +360,7 @@ org.apache.flex.utils.MXMLDataInterprete
             simple = data[i++];
             value = data[i++];
             if (simple == null)
-                value = generateMXMLArray(host, null, value, false);
+                value = generateMXMLArray(host, null, value, true);
             else if (simple == false)
                 value = generateMXMLObject(host, value);
             if (typeof(host['set_' + name]) == 'function')
@@ -344,13 +386,13 @@ org.apache.flex.utils.MXMLDataInterprete
                 host[name] = value;
         }
         */
-        
+
         m = data[i++]; // num events
         for (j = 0; j < m; j++)
         {
             name = data[i++];
             value = data[i++];
-            host.addEventListener(name, 
+            host.addEventListener(name,
                 org.apache.flex.FlexGlobal.createProxy(host, value));
         }
 };



Mime
View raw message