0 Replies Latest reply on Jan 29, 2007 1:56 PM by AHegedus

    Flex Tree/Webservice Interaction

      Hi All... I'm trying to fill a tree with the result of a web service, and then trigger that web service again when a node is opened. I'll try to explain....

      I have a webservice that returns facility information. I feed it a facilityID and it gives back facilities and devices that are assigned to that facility. So this webservice can allow you to drill down...i.e. facility 1 has device x,y,and z and facility 2, send 2 to the WS and get back devices a,b, and c.

      My problem is that I can't seem to figure out how to do this. I have the web service definition:
      <mx:WebService id="gssdata" showBusyCursor="true" wsdl=" http://localhost/GSSData/service.asmx?WSDL">
      <mx:operation name="facilityList" resultFormat="e4x" fault="showFault(event)" result="getFacilityResult(event)" >

      and I call the tree:
      <mx:Tree id="tree" top="72" left="50" dataProvider="{facilityMainData.facilityListResult.facilities.facility}" height="224" width="179" itemOpen="itemClick(event)" labelFunction="treeLabel"/>

      I'm able to load the page and see the initial data in the tree, but I can't figure out how to do the itemOpen Event. How can I call the web service and get the result of the web service without changing all that's in the tree already? Do I somehow have to have another event handler for this? and if so, how do I tell that handler what node to add the results to?

      I'm really stumped by this, so any help anyone could give would be really appreciated!!!