flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/release0.8.0] - Fixed ListExample.
Date Wed, 17 May 2017 17:33:30 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/release0.8.0 4a3117658 -> 57d3155a8


Fixed ListExample.


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

Branch: refs/heads/release0.8.0
Commit: 57d3155a8009d07d63edd9567c4a918bdc8e5b6f
Parents: 4a31176
Author: Peter Ent <pent@apache.org>
Authored: Wed May 17 13:33:28 2017 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Wed May 17 13:33:28 2017 -0400

----------------------------------------------------------------------
 .../src/main/flex/MyInitialView.mxml            | 23 ++++++++++++++++++--
 .../main/flex/simple/IRFactoryForArrayData.as   |  2 +-
 2 files changed, 22 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/57d3155a/examples/flexjs/ListExample/src/main/flex/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ListExample/src/main/flex/MyInitialView.mxml b/examples/flexjs/ListExample/src/main/flex/MyInitialView.mxml
index bb05be8..e62c41c 100644
--- a/examples/flexjs/ListExample/src/main/flex/MyInitialView.mxml
+++ b/examples/flexjs/ListExample/src/main/flex/MyInitialView.mxml
@@ -30,14 +30,33 @@ limitations under the License.
 			IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout");
 			IDataProviderItemRendererMapper: ClassReference("simple.IRFactoryForArrayData");
 			IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
-			IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
+			IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
	
+			IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
		
 			
 			overflow: auto;
 			border: 1px solid #CCCCCC;
 		}
+		
+		js|StringItemRenderer {
+			height: 30px;
+		}
 	</fx:Style>
+
+	<js:Label x="20" y="20" text="A FlexJS List" />
+	
+	<js:List x="20" y="40" width="400" height="300">
+		<js:beads>
+			<js:ConstantBinding
+				sourceID="applicationModel"
+				sourcePropertyName="productNames"
+				destinationPropertyName="dataProvider" />
+		</js:beads>
+	</js:List>
+
 	
-	<gen:GenericList x="20" y="20" width="400" height="300" className="GenericList">
+	<js:Label x="500" y="20" text="A local list using DataContainer" />
+		
+	<gen:GenericList x="500" y="40" width="400" height="300" className="GenericList">
 		<gen:beads>
 			<js:ConstantBinding
 				sourceID="applicationModel"

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/57d3155a/examples/flexjs/ListExample/src/main/flex/simple/IRFactoryForArrayData.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/ListExample/src/main/flex/simple/IRFactoryForArrayData.as b/examples/flexjs/ListExample/src/main/flex/simple/IRFactoryForArrayData.as
index 956b847..64adf17 100644
--- a/examples/flexjs/ListExample/src/main/flex/simple/IRFactoryForArrayData.as
+++ b/examples/flexjs/ListExample/src/main/flex/simple/IRFactoryForArrayData.as
@@ -155,7 +155,7 @@ package simple
 			for (var i:int = 0; i < n; i++)
 			{
 				var ir:ISelectableItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as
ISelectableItemRenderer;
-				dataGroup.addElement(ir);
+				dataGroup.addItemRenderer(ir);
 				ir.index = i;
 				ir.labelField = list.labelField;
 				if (presentationModel) {


Mime
View raw message