3/4/2011 3:06:51 PM
Title:
Student
Hello, I'm working on a project for my Web Services class. This week's focus is bring an external xml file into our project and then using a submit button to publish it to a datagrid. I am of the sort that has to see it and work with it before it works for me. Can you help.
I have a form that is all set up ready to go. It has Combo Boxes for Name, Date, Location, Code and Priority. I also have a text box for Additional Notes.
Below that I have a data grid that has three columns. One for task. One for the Code (Which is just a desc. of the of the task) and priority.
I would like to connect my xml file from a location on the web. Then using a submit button, propogate the datagrid.
I could sure use some help.
Thank you,
Vicki
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" backgroundColor="#FFFFFF" height="650" width="500">
<!-- <fx:Declarations>
<s:HttpService
id="GettingThingsDone"
<!-- this is the location of the xml file -->
url="http://vickir.t.southcentral.edu/prjHttpService.xml"/>
</fx:Declarations> -->
<s:ComboBox x="35" y="70" id="comBoxName" contentBackgroundColor="#FFFFFF"/>
<mx:DateField x="35" y="115" id="comBoxDate" contentBackgroundColor="#FFFFFF"/>
<s:ComboBox x="35" y="160" id="comBoxLocation" contentBackgroundColor="#FFFFFF"/>
<s:ComboBox x="35" y="205" id="comBoxCode" contentBackgroundColor="#FFFFFF"/>
<s:ComboBox x="35" y="250" id="comBoxPriority" contentBackgroundColor="#FFFFFF"/>
<s:TextArea x="225" y="190" id="txtDescription" height="100" width="220" contentBackgroundColor="#FFFFFF"/>
<s:Button x="100" y="300" label="Summary" width="75" height="25" id="btnsummary"/>
<s:Button x="260" y="300" label="Start" id="btnStartTime" width="50" height="25"/>
<s:Button x="340" y="300" label="Stop" id="btnStopTime" width="50" height="25"/>
<mx:DataGrid x="40" y="334" width="420" height="288" id="dataGrid">
<mx:columns>
<mx:DataGridColumn headerText="Task" dataField="task" resizable="true"/>
<mx:DataGridColumn dataField="code" headerText="Code"/>
<mx:DataGridColumn headerText="Priority" dataField="priority"/>
</mx:columns>
</mx:DataGrid>
<s:Label x="35" y="55" text="Name" id="lblName" fontFamily="Times New Roman" fontSize="14"/>
<s:Label x="35" y="100" text="Date" id="lblDate" fontFamily="Times New Roman" fontSize="14"/>
<s:Label x="35" y="145" text="Location" id="lblLocation" fontFamily="Times New Roman" fontSize="14"/>
<s:Label x="35" y="190" text="Job Code" id="lblCode" fontFamily="Times New Roman" fontSize="14"/>
<s:Label x="35" y="235" text="Priority" id="lblPriority" fontFamily="Times New Roman" fontSize="14"/>
<s:Label x="225" y="175" text="Additional Notes" id="lblNotes" fontFamily="Times New Roman" fontSize="14"/>
<mx:Image x="215" y="48" width="245" height="110" source="graphic/timings.png"/>
<mx:Image x="0" y="0" width="500" height="15" source="graphic/borderTop.png"/>
<mx:Image x="0" y="0" width="15" height="650" source="graphic/borderLeft.png"/>
<mx:Image x="0" y="635" width="500" height="15" source="graphic/borderBottom.png"/>
<mx:Image x="485" y="0" width="15" height="650" source="graphic/borderRight.png"/>
</s:WindowedApplication>
3/6/2011 10:45:46 AM
you can check the following URLs to populate the datagrid in flex or flash builder using httpservice with XML
http://brad.melendy.com/?p=75
http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/