why not just do
private function initApp():void{
var xml:XML = /*ur dataProvider*/;
xml..child("item1");
}



----- Original Message ----
From: flex2_4me <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, January 17, 2008 11:35:01 PM
Subject: [flexcoders] Re: Dataprovider for list

Hi Paul-

This doesn`t work...

Any help is really appreciated. .

--- In [EMAIL PROTECTED] ups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> Looks as though it should work.
> 
> Try:
> 
> <mx:List id="aa"dataProvider ="{getService. lastResult. .item1}" 
x="10" 
> y="25"/>
> 
> Paul
> ----- Original Message ----- 
> From: "flex2_4me" <[EMAIL PROTECTED] ..>
> To: <[EMAIL PROTECTED] ups.com>
> Sent: Wednesday, January 16, 2008 12:10 PM
> Subject: [flexcoders] Dataprovider for list
> 
> 
> > Hi-
> >
> > I have an XML file as follows
> >
> > <?xml version="1.0" encoding="utf8" ?>
> > <root>
> > <food>
> > <category>Fruit< /category>
> > <categoryitem>
> > <item1>Cakes< /item1>
> > <item2>Chocolates< /item2>
> > </categoryitem>
> > <category>Vegetable </category>
> > <categoryitem>
> > <item1>Onion< /item1>
> > <item2>Potato< /item2>
> > <item3>Tomato< /item3>
> > </categoryitem>
> > </food>
> > </root>
> >
> > I am using HTTPservice with id "getService"
> >
> > <mx:List
> > id="aa"dataProvider ="{getService. lastResult. root.food. category} "
> > x="10" y="25"/>
> >
> > Using this i am getting 'Fruit' and 'vegetable' in the list
> >
> > Now my Question is i want all <item1> to be displayed in list 
control
> > ie.'Cakes'& 'onion'
> > For this i tried
> > <mx:List
> > 
id="aa"dataProvider ="{getService. lastResult. root.food. categoryitem. ite
> > m1}" x="10" y="25"/>
> >
> > But it is throwing error:
> >
> > Error: Unknown Property: 'item1'.
> > at
> > 
mx.collections: :ListCollectionV iew/http://www.adobe. com/2006/ actionscr
> > ipt/flash/proxy: :getProperty( )[E:\dev\ flex_3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\collectio ns\ListCollectio nVi
> > ew.as:690]
> > at mx.binding:: PropertyWatcher/ updateProperty( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:2
> > 91]
> > at Function/http://adobe. com/AS3/2006/ builtin:: apply()
> > at mx.binding:: Watcher/wrapUpda te()[E:\dev\ flex_3_beta3
> > \sdk\frameworks\ projects\ framework\ src\mx\binding\ Watcher.as: 180]
> > at mx.binding:: PropertyWatcher/ updateParent( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:1
> > 97]
> > at mx.binding:: Watcher/updateCh ildren()[ E:\dev\flex_ 3_beta3
> > \sdk\frameworks\ projects\ framework\ src\mx\binding\ Watcher.as: 126]
> > at mx.binding:: PropertyWatcher/ updateProperty( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:3
> > 00]
> > at Function/http://adobe. com/AS3/2006/ builtin:: apply()
> > at mx.binding:: Watcher/wrapUpda te()[E:\dev\ flex_3_beta3
> > \sdk\frameworks\ projects\ framework\ src\mx\binding\ Watcher.as: 180]
> > at mx.binding:: PropertyWatcher/ updateParent( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:1
> > 97]
> > at mx.binding:: Watcher/updateCh ildren()[ E:\dev\flex_ 3_beta3
> > \sdk\frameworks\ projects\ framework\ src\mx\binding\ Watcher.as: 126]
> > at mx.binding:: PropertyWatcher/ updateProperty( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:3
> > 00]
> > at Function/http://adobe. com/AS3/2006/ builtin:: apply()
> > at mx.binding:: Watcher/wrapUpda te()[E:\dev\ flex_3_beta3
> > \sdk\frameworks\ projects\ framework\ src\mx\binding\ Watcher.as: 180]
> > at mx.binding:: PropertyWatcher/ updateParent( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:1
> > 97]
> > at mx.binding:: Watcher/updateCh ildren()[ E:\dev\flex_ 3_beta3
> > \sdk\frameworks\ projects\ framework\ src\mx\binding\ Watcher.as: 126]
> > at mx.binding:: PropertyWatcher/ updateProperty( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:3
> > 00]
> > at Function/http://adobe. com/AS3/2006/ builtin:: apply()
> > at mx.binding:: Watcher/wrapUpda te()[E:\dev\ flex_3_beta3
> > \sdk\frameworks\ projects\ framework\ src\mx\binding\ Watcher.as: 180]
> > at mx.binding:: PropertyWatcher/ updateParent( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:1
> > 97]
> > at mx.binding:: Watcher/updateCh ildren()[ E:\dev\flex_ 3_beta3
> > \sdk\frameworks\ projects\ framework\ src\mx\binding\ Watcher.as: 126]
> > at mx.binding:: PropertyWatcher/ updateProperty( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:3
> > 00]
> > at Function/http://adobe. com/AS3/2006/ builtin:: apply()
> > at mx.binding:: Watcher/wrapUpda te()[E:\dev\ flex_3_beta3
> > \sdk\frameworks\ projects\ framework\ src\mx\binding\ Watcher.as: 180]
> > at mx.binding:: PropertyWatcher/ eventHandler( )
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ framework\ src\mx\binding\ PropertyWatcher. as:3
> > 23]
> > at flash.events: :EventDispatcher /dispatchEventFu nction()
> > at flash.events: :EventDispatcher /dispatchEvent( )
> > at
> > 
mx.rpc::AbstractInv oker/http://www.adobe. com/2006/ flex/mx/internal ::re
> > sultHandler( )[E:\dev\ flex_3_beta3
> > \sdk\frameworks\ projects\ rpc\src\mx\ rpc\AbstractInvo ker.as:195]
> > at mx.rpc::Responder/ result()[ E:\dev\flex_ 3_beta3
> > \sdk\frameworks\ projects\ rpc\src\mx\ rpc\Responder. as:48]
> > at mx.rpc::AsyncReques t/acknowledge( )[E:\dev\ flex_3_beta3
> > \sdk\frameworks\ projects\ rpc\src\mx\ rpc\AsyncRequest .as:81]
> > at DirectHTTPMessageRe sponder/complete Handler()
> > [E:\dev\flex_ 3_beta3
> > 
\sdk\frameworks\ projects\ rpc\src\mx\ messaging\ channels\ DirectHTTPChann
> > el.as:387]
> > at flash.events: :EventDispatcher /dispatchEventFu nction()
> > at flash.events: :EventDispatcher /dispatchEvent( )
> > at flash.net::URLLoade r/onComplete( )
> >
> > Any help in this regard is highly appreciated.
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: 
http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt
> > Search Archives: http://www.mail- archive.com/ flexcoders%
40yahoogroups. com
> > Yahoo! Groups Links
> >
> >
> >
> >
>





      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Reply via email to