2 Replies Latest reply on Jan 13, 2008 1:44 PM by 2JZ

    Reloading XML?

    2JZ Level 1
      My flex application binds grid/chart from a XML file using HTTPService as follow:

      <mx:HTTPService id="MainSrv" url="{LoadFilePath}" showBusyCursor="true" useProxy="false" result="DBResultHandler(event)" />

      and:
      private function DBResultHandler(event:ResultEvent):void
      {
      if( event.result.list.market.stats.source is ArrayCollection )
      MarketAC = event.result.list.market.stats.source;
      else
      MarketAC = new ArrayCollection( ArrayUtil.toArray(event.result.list.market.stats.source) );
      MainSrv.disconnect();
      }

      The "LoadFilePath" has the file path to the file. From time to time, it may be edited/ overwrited. I want to create a button. User can click on it and get the latest content to reflict to the UI.
      When the button got clicked, it calls the MainSrv.send();

      But, it is not working. What's wrong with my logic? Please help!