1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="userRequest.send()">
  3. <mx:HTTPService id="userRequest" url="http://localhost:8080/DbToXml/ReadData" useProxy="false" method="GET">
  4. </mx:HTTPService>
  5. <mx:Form x="22" y="10" width="493">
  6. <mx:HBox>
  7. <mx:Label text="Employee Id"/>
  8. <mx:TextInput id="eid" text ="{dgUserRequest.selectedItem.eid}" />
  9. </mx:HBox>
  10. <mx:HBox>
  11. <mx:Label text="Employee Name"/>
  12. <mx:TextInput id="ename" text="{dgUserRequest.selectedItem.ename}" />
  13. </mx:HBox>
  14. </mx:Form>
  15. <mx:DataGrid id="dgUserRequest" x="22" y="128" dataProvider="{userRequest.lastResult.employees.employee}" selectedIndex="1">
  16. <mx:columns>
  17. <mx:DataGridColumn headerText="Employee Id" dataField="eid"/>
  18. <mx:DataGridColumn headerText="Employee Name" dataField="ename"/>
  19. </mx:columns>
  20. </mx:DataGrid>
  21. </mx:Application>