5 Replies Latest reply on May 17, 2007 2:21 PM by svevo

    Data binding in a function call inside a Repeater

    mc7823478243 Level 1
      I'm new to Flex, and after reading all the documentation I can find, I can't figure out the correct syntax (or maybe it's not possible) to call a function inside a Repeater, where the parameter is bound to the currentItem of the Repeater. Here's my construct -- everything works fine except the click attribute of the Button:

      <mx:Repeater id="rp" dataProvider="{feedRequest.lastResult.node.children.child}">
      <mx:Button label="{rp.currentItem.label}" width="105" height="46"
      click="{requestNode(rp.currentItem.id);}"/>
      </mx:Repeater>

      When the Button is clicked, I want to call my function like:
      requestNode("1.0");
      but I just get the error
      Error: Repeater is not executing.
      at mx.core::Repeater/get currentItem()
      at Prototype/___Button3_click()

      Thanks for any help.