2 Replies Latest reply on Apr 13, 2009 2:18 PM by dpark1113

    Accessing dataprovider from mxml component.

    dpark1113 Level 1

      Hi,

       

      I have a dataprovider and would like to access the data from mxml component.

       

      Basically I have

       

      Actionscript:

       

       

       

       

       

      [

      Bindable]

      private

       

      var dp:ArrayCollection;

       

       

       

      private

       

      function dp_handler(e:ResultEvent):void

      {

      dp = e.result

      as ArrayCollection;

       

      }

       

      I wanted to access dp from mxml component using

       

      <mx:script>

      <![CDATA[

      mx.core.Application;

      lbl.text = Application.application.dp.getItemAt(0).fieldname;

      ]]>

      <mx:Label

       

      id="lbl" x="51" y="136" />

       

       

      It keeps telling me dp is unknow property.  Any idea what am I doing wrong?