I am creating 2 list boxs.  One gets filled with departments onload, the 
other I want to populate with people in the dept when someone clicks on 
a dept.  This is my 2ed day learning flex so I can make a major app with 
it. 

Here is the code sofar

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"; 
initialize="initApp()">
  <mx:WebService wsdl="http://localhost/getdepts.cfc?wsdl"; id="webservice1">
      <mx:operation name="get_dept">
        <mx:request></mx:request>
      </mx:operation>
      <mx:operation name="get_people">
        <mx:request>
                </mx:request>
      </mx:operation>
    </mx:WebService>
        <mx:Model id="depts">
                {webservice1.get_dept.result}
        </mx:Model>
        <mx:Model id="people">
                {webservice1.get_name.result}
        </mx:Model>
        <mx:Script>
                function initApp() {
                        webservice1.get_dept.send();
                }
                
                function getName() {
                        webservice1.get_name.load();
                }
        </mx:Script>
<mx:VBox width="100%" height="100%">
    <mx:HBox width="100%" height="100%">
      <mx:Panel title="Department List" width="50%" height="100%">
        <mx:DataGrid id="Dept_List" width="100%" height="100%" 
resizableColumns="true" sortableColumns="true" dataProvider="{depts}" 
change="getName(event.target.selectedItem.DEPT_CODE)">
          <mx:columns>
            <mx:Array>
              <mx:DataGridColumn headerText="Department Code" 
columnName="DEPT_CODE" />
              <mx:DataGridColumn headerText="Department Name" 
columnName="DEPT_NAME" />
            </mx:Array>
          </mx:columns>
        </mx:DataGrid>
      </mx:Panel>
      <mx:Panel title="Department Personel" width="50%" height="100%">
        <mx:DataGrid id="Dept_Per" width="100%" height="100%" 
dataProvider="{people}">
          <mx:columns>
            <mx:Array>
              <mx:DataGridColumn headerText="Name" columnName="FULL_NAME" />
            </mx:Array>
          </mx:columns>
        </mx:DataGrid>
      </mx:Panel>
    </mx:HBox>
    <mx:ControlBar width="100%" height="35" horizontalAlign="right" 
horizontalGap="0" verticalGap="0" verticalAlign="middle" marginBottom="5" 
marginLeft="5" marginRight="5" marginTop="5">
      <mx:Button label="Exit" />
    </mx:ControlBar>
  </mx:VBox>  
  </mx:Application>

-- 
Greg Johnson
Owner & Lead Technician
[EMAIL PROTECTED]

Techno-Fix-It
Filling the Gap Between the Store and the Repair Shop
----------------------
www.technofixit.com
Phone:(919)-371-1476
Fax:(919)-882-9804
P.O. Box 1094
Morrisville, N.C. 27560


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218068
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to