6 Replies Latest reply on Dec 15, 2008 8:05 AM by rtalton

    HTTPService and HierarchicalData

    Gizmo8560
      Hi everyone.
      I have a problem with the function HierarchicalData.
      I made a request like that:

      <mx:HTTPService id="resourceDataRequest" url=" http://ba-zend/thomas/ojd/gantt/resourcedata" useProxy="false" method="POST">
      <mx:request xmlns="">
      </mx:request>
      </mx:HTTPService>

      I receive that kind of data:

      <data>
      <ressource id="C1" name="campagne 1" type="campagne">
      <ressource id="E1" name="evenement 1" type="evenement"/>
      <ressource id="E2" name="evenement 2" type="evenement"/>
      <ressource id="E3" name="evenement 3" type="evenement"/>
      </ressource>
      <ressource id="C2" name="campagne 2" type="campagne">
      <ressource id="E4" name="evenement 1" type="evenement"/>
      <ressource id="E5" name="evenement 2" type="evenement"/>
      </ressource>
      </data>

      and after I do
      <mx:AdvancedDataGrid width="100%" height="100%"
      dataProvider="{new HierarchicalData(resourceDataRequest)}">
      <mx:columns>
      <mx:AdvancedDataGridColumn dataField="@id"
      headerText="Id"/>
      <mx:AdvancedDataGridColumn dataField="@name"
      headerText="Name"/>
      <mx:AdvancedDataGridColumn dataField="@type"
      headerText="Type"/>
      </mx:columns>
      </mx:AdvancedDataGrid>

      But that did not work!!!!

      When I do:
      <mx:XMLList id="dpHierarchyXML2">
      <data>
      <ressource id="C1" name="campagne 1" type="campagne">
      <ressource id="E1" name="evenement 1" type="evenement"/>
      <ressource id="E2" name="evenement 2" type="evenement"/>
      <ressource id="E3" name="evenement 3" type="evenement"/>
      </ressource>
      <ressource id="C2" name="campagne 2" type="campagne">
      <ressource id="E4" name="evenement 1" type="evenement"/>
      <ressource id="E5" name="evenement 2" type="evenement"/>
      </ressource>
      </data>
      </mx:XMLList>

      and after
      <mx:AdvancedDataGrid width="100%" height="100%"
      dataProvider="{new HierarchicalData(dpHierarchyXML2)}">
      <mx:columns>
      <mx:AdvancedDataGridColumn dataField="@id"
      headerText="Id"/>
      <mx:AdvancedDataGridColumn dataField="@name"
      headerText="Name"/>
      <mx:AdvancedDataGridColumn dataField="@type"
      headerText="Type"/>
      </mx:columns>
      </mx:AdvancedDataGrid>

      that works!!!

      what's the matter??
      Is there any probleme with the function HierarchicalData and HTTPService ?