3 Replies Latest reply on Jan 4, 2011 2:00 PM by Shongrunden

    data attribut in ItemRenderer is empty but i see data in appl.

    Hor4na

      Hello,

       

      i make a stupid ItemRenderer. For better debugging i create a isVisible method, where i obtain the data object.

       

      My goal is to display Label only when data.displayColumn == 1.

       

      Problem: by debugging i see, that the data (and b variable) object is null. But in application (gui) i see right data (took from data.code and data.displayColumn variables).

       

      Whats wrong?

       

      tHx,
      Horyna

       


      <s:ItemRenderer>
      <fx:Script>
      <![CDATA[
      private function isVisible():Boolean {
      var b:Object = data;
      return true; }     ]]>
      </fx:Script>
      <s:Label text="{data.code + ' ~' + data.displayColumn + '~'}" includeInLayout="{isVisible()}"/>
      </s:ItemRenderer>