Thanks,
Sorry, the service was infact
called “service_Events”, just screwed up
the email!
Thanks for your reply, just realized how
stupid I was!
Steve
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf
Of Sreejith Unnikrishnan
Sent: 28 July 2005 14:13
To: [email protected]
Subject: Re: [flexcoders]
Databinding to a webservice from within a component
My experience is that it
is always nice to store the result in a variable.
Bind this variable to event.result from the webservice.
Access this variable from any component anywhere.
INDEX.MXML
<mx:Script>
var eventDetailsResult;
<mx:Script>
<mx:WebService id="service_Events”
wsdl="..................." showBusyCursor="true">
<mx:operation name="GetEventDetails"
result="eventDetailsResult=event.result">
...................
<component
dataSource={eventDetailsResult} ....
COMPONENT.MXML
<mx:Script>
var dataSource;
<mx:Script>
<mx:DataGrid dataProvider={dataSource}
....
Hope this helps!
Regards
Sree
PS: I am wondering how could you bind "service_Events.GetEventDetails.result"
IF your webService ID is indeed ”eventsService” as you mention!
Steve Cox wrote:
Hi,
First person, a new flex developer, so bare with me!
I’m using a webservice defined in ‘index.mxml’ called
”eventsService”. Now I previously had a datagrid within this file
which had the dataprovider set as:
service_Events.GetEventDetails.result.diffgram.NewDataSet.Table This all worked
fine.
Problem is, I now want to separate my app into components. How do I now
access that service?
I’ve tried
mx.core.Application.application.service_Events.GetEventDetails.result.diffgram.NewDataSet.Table,
however I get the “changes to unknown property..” warning, and the
datagrid won’t update.
What’s the best way to do this?
Cheers,
Steve
--
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
YAHOO! GROUPS LINKS