| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| 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. |
| |
| --> |
| <basic:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:basic="library://ns.apache.org/flexjs/basic" |
| xmlns:local="*"> |
| <fx:Script> |
| <![CDATA[ |
| |
| private function handleListChange() : void |
| { |
| pickLabel.text = "Selected: "+productList.selectedItem.title; |
| } |
| ]]> |
| </fx:Script> |
| |
| <fx:Style> |
| @namespace basic "library://ns.apache.org/flexjs/basic"; |
| @namespace sample "products.*"; |
| |
| |
| .productList { |
| IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForArrayData"); |
| IItemRenderer: ClassReference("products.ProductItemRenderer"); |
| } |
| |
| sample|ProductItemRenderer { |
| height: 40; |
| IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.ItemRendererMouseController"); |
| } |
| |
| </fx:Style> |
| |
| <basic:List id="productList" x="20" y="20" width="200" height="150" className="productList" change="handleListChange()"> |
| <basic:beads> |
| <basic:ConstantBinding |
| sourceID="applicationModel" |
| sourcePropertyName="products" |
| destinationPropertyName="dataProvider" /> |
| </basic:beads> |
| </basic:List> |
| |
| <basic:Label id="pickLabel" x="250" y="20" width="200" /> |
| |
| </basic:ViewBase> |