7 Replies Latest reply on Feb 4, 2011 11:47 AM by Pablo Souza

    binding expression syntax -- can the experts comment?

    One_Life Level 1

      In the ItemRenderer code below, the following binding expression really perplexed me:


         <s:Label text="{data.firstName} {data.lastName}" />


      Then after digging in the manual on itemRenderers*, and discovering data is a property of the ItemRenderer, I changed it to:


          <s:Label text="{this.data.firstName} {this.data.lastName}" />


      and it still worked.  My question is, can you enumerate the allowed syntax in binding expressions  -- e.g. how can the 'this' keyword be left off, or if easier, point me to where the legal binding syntax is described?  I can't find it online.  Thanks.




      <?xml version="1.0" encoding="utf-8"?>
      <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
        <s:BorderContainer backgroundColor="#cccccc" >
            <s:VerticalLayout horizontalAlign="center" verticalAlign="middle" />
          <s:Label text="{data.firstName} {data.lastName}" />
          <mx:Image source="images/{data.id}.jpg" />



      * per http://help.adobe.com/en_US/flex/using/WS03d33b8076db57b9-23c04461124bbeca597-8000.html#WS 3B0D227A-DBFE-424c-9076-E834C5833E30