Re: [flexcoders] Re: Webservice Results Format

2006-07-06 Thread Will Morgan



Hi Tim - thanks for the reply. I'll check out the link you provided. I ended up using a filter function, which works well :) I've been begging our IT manager to fix the way he's returning operation results, but graphic designers like me don't get much say in technical matters around here!
    private function resultHandler(res:ResultEvent):void {    myLinesAC = res.result.Lines;    myHeadersAC = res.result.Headers;    headersDG.dataProvider = myHeadersAC;
    }        private function filterLinesOutOfHeader():void {     myLinesAC.filterFunction = doFilter;    myLinesAC.refresh();    }    
    private function doFilter(item:Object):Boolean {    return item.CustomerOrderNumber == headersDG.selectedItem.CustomerOrderNumber;    }        private function userChange():void {
    filterLinesOutOfHeader();    linesDG.dataProvider = myLinesAC ;    }Will.On 7/6/06, Tim Hoff <
[EMAIL PROTECTED]> wrote:












  



Hi Will,
It's much easier to work with one-to-many data relationships, if the xml is in a hiarchical format.  In your example, the header node is at the same level as the lines node.  That makes them siblings.  Since an order has only one header, you can move the header node items into the order node (attributes work here too). This will make it easier to associate the children with the parent.  If you're interested, here is a similar one-to-many example; that also illustrates DataGrid expansion-in-place.

http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=472
 
I hope that this helps you,Tim Hoff--- In 
flexcoders@yahoogroups.com, "Will Morgan" <[EMAIL PROTECTED]> wrote:>> Hi All,> > The results from the webservice I'm using look something like this:> > 
> > 12345> > > > > > > > 
> > It's similar to a master / detail view.> > I can only bind to either headers or orders.> > headersDataGrid.dataprovider = "{webservice.getOrder.lastResult.headers}"> 
> I was hoping I could use headersDataGrid.selectedItem.lines to show the> lines detail in another dataGrid, but because it is only bound to headers, I> can't do it.> > Is there a simple way to do this within Flex or would you suggest changing
> the way the results are returned?>

  















__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



[flexcoders] Re: Webservice Results Format

2006-07-06 Thread Tim Hoff



Hi Will,
It's much easier to work with one-to-many data relationships, if the xml is in a hiarchical format.  In your example, the header node is at the same level as the lines node.  That makes them siblings.  Since an order has only one header, you can move the header node items into the order node (attributes work here too). This will make it easier to associate the children with the parent.  If you're interested, here is a similar one-to-many example; that also illustrates DataGrid expansion-in-place.
http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=472 
I hope that this helps you,Tim Hoff--- In flexcoders@yahoogroups.com, "Will Morgan" <[EMAIL PROTECTED]> wrote:>> Hi All,> > The results from the webservice I'm using look something like this:> > > > 12345> > > > > > > > > > It's similar to a master / detail view.> > I can only bind to either headers or orders.> > headersDataGrid.dataprovider = "{webservice.getOrder.lastResult.headers}"> > I was hoping I could use headersDataGrid.selectedItem.lines to show the> lines detail in another dataGrid, but because it is only bound to headers, I> can't do it.> > Is there a simple way to do this within Flex or would you suggest changing> the way the results are returned?>

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   



  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



[flexcoders] Re: Webservice Results Format

2006-07-05 Thread Will Morgan



Sorry, screwed up on the results, but I think you get my point...W.On 7/5/06, Will Morgan <[EMAIL PROTECTED]
> wrote:Hi All,The results from the webservice I'm using look something like this:
  12345   
       It's similar to a master / detail view. I can only bind to either headers or orders. headersDataGrid.dataprovider = "{webservice.getOrder.lastResult.headers

}"I was hoping I could use headersDataGrid.selectedItem.lines to show the lines detail in another dataGrid, but because it is only bound to headers, I can't do it.Is there a simple way to do this within Flex or would you suggest changing the way the results are returned?



__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   



  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___