Reputation:

AdobeTV: Working with Data in Flex by James Ward - empWeb example in Flash Builder 4.0 Beta

From a video on AdobeTV, I tried to play with example empWeb (LiveCycle Data Services). In Flex Builder 3 (FB3) everything works fine. When I tried this on Flash Builder 4.0 Beta (FB4) it doesn't work. When I replaced original xmlns declarations (2009, spark, halo) with declarations from FB3 (2006) it works. Could you explain why?

I'm using the default SDKs (Flex 3.2 for FB3 and Flex 4.0 for FB4). I investigated this (please see 3 source code examples). Source #1 works OK in FB3 and FB4, Source #2 gives a FB4 compilation error message:

In initializer for 'mxmlContentFactory', type flex.samples.crm.employee.Employee is not assignable to target Array element type mx.core.IVisualElement

Source #3 compilation is OK, but in the browser it displays only a white screen (no table no data).

Source #1

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="adobe.com/2006/mxml"; styleName="plain"
    applicationComplete="ds.fill(employees)" xmlns:employee="flex.samples.crm.employee.*">
    <employee:Employee/>
    <mx:ArrayCollection id="employees"/>
    <mx:DataService id="ds" destination="crm-employee"/>
    <mx:DataGrid dataProvider="{employees}" width="100%" height="100%" editable="true"/>
</mx:Application>

Source #2

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="ns.adobe.com/mxml/2009"; xmlns:s="library://ns.adobe.com/flex/spark" 
    xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" 
    xmlns:employee="flex.samples.crm.employee.*">
    <employee:Employee/> 
    <mx:ArrayCollection id="employees"/> 
    <mx:DataService id="ds" destination="crm-employee"/> 
    <mx:DataGrid dataProvider="{employees}" width="100%" height="100%" editable="true"/> 
</s:Application> 

Source #3

<?xml version="1.0" encoding="utf-8"?> 
<s:Application xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="adobe.com/2006/mxml"; 
    minWidth="1024" minHeight="768" xmlns:employee="flex.samples.crm.employee.*"> 
    <employee:Employee/> 
    <mx:ArrayCollection id="employees"/> 
    <mx:DataService id="ds" destination="crm-employee"/> 
    <mx:DataGrid dataProvider="{employees}" width="100%" height="100%" editable="true"/> 
</s:Application>

Upvotes: 0

Views: 759

Answers (1)

Jeff Pinkston
Jeff Pinkston

Reputation: 176

Which SDK are you using for the respective environments? Differences there may cause issues.

Upvotes: 0

Related Questions