Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
Adobe Flex SDK 4.5.1 (Release)
-
None
-
None
-
Affected OS(s): Windows
Affected OS(s): Windows 7
Language Found: English
Description
1. Create an application as the following.
<?xml version="1.0"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init()"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:layout>
<s:VerticalLayout paddingLeft="10" paddingTop="10"/>
</s:layout>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<fx:XML id="jobCrew" xmlns="">
<root>
<crew>
<emp_mstr_sid>3415</emp_mstr_sid>
<cname>Cortez Peter A.</cname>
<pack_id>0</pack_id>
</crew>
<crew>
<emp_mstr_sid>3484</emp_mstr_sid>
<cname>Dobrik Mark J.</cname>
<pack_id>0</pack_id>
</crew>
<crew>
<emp_mstr_sid>3495</emp_mstr_sid>
<cname>Eilken Russell S.</cname>
<pack_id>0</pack_id>
</crew>
</root>
</fx:XML>
<fx:XMLList id="packList" xmlns="">
<ocu>
<pack_id>42</pack_id>
<tag>1</tag>
</ocu>
<ocu>
<pack_id>28</pack_id>
<tag>2</tag>
</ocu>
<ocu>
<pack_id>67</pack_id>
<tag>3</tag>
</ocu>
<ocu>
<pack_id>44</pack_id>
<tag>4</tag>
</ocu>
</fx:XMLList>
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.*;
private function init():void
{
crew.dataProvider = new XMLListCollection(jobCrew.crew);
var ocuList:ClassFactory = new ClassFactory(dropdownRendererDataGrid);
ocuList.properties =
;
var col:GridColumn = GridColumn(crew.columns.getItemAt(1));
col.itemRenderer = ocuList;
}
]]
>
</fx:Script>
<s:DataGrid requestedRowCount="4" id="crew">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="cname" headerText="Name" width="150">
</s:GridColumn>
<s:GridColumn dataField="pack_id" headerText="OCU">
<s:itemRenderer>
<fx:Component>
<s:GridItemRenderer>
</s:GridItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:GridColumn>
</s:ArrayList>
</s:columns>
</s:DataGrid>
</s:Application>
2. use attached as a custom renderer.
3. Select a value from any dropdownlist. It should crash in SDK. It fails because of a line:
ArrayCollection(dataProvider).refresh();