First, I think you should use selectedNode, not selectedItem.

I also think you should put your data in the data object and then use
the TreeDataProvider API: tree2.selectedNode.getData().UserBemsId.

Perhaps you can get at the id the way you have it if you do:
tree2.selectedNode.getProperty("UserBemsId")

If you still get the warning, cast the reference to String:
String(tree2.selectedNode.getData().UserBemsId)

Tracy

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of cnewroth55
Sent: Friday, July 15, 2005 10:56 AM
To: [email protected]
Subject: [flexcoders] Re: getting data to a webservice from a tree node
- fix found (sort of)

well, i searched the archives and found this, which works, but i do 
get a 'warning', "Changes to unknown property, UserBemsID, will not 
be detected."...
here is what I used to pass up to WS from Tree...

{tree1.selectedItem.attributes.UserBemsID}

now, can anyone tell me why i get the warning?

--- In [email protected], "cnewroth55" <[EMAIL PROTECTED]> 
wrote:
> how does one get data from a selected tree node to a parameter in 
a 
> web service? I have a tree and tried doing the selectedItem. call 
> but it doesn't pass the data up to the webservice; here is the 
> webserice call;
> <mx:WebService 
> wsdl="http://127.0.0.1:8300/components/getTechPOCUserID.cfc?wsdl"; 
> id="POCservice1">
>       <mx:operation name="getuserinfo">
>         <mx:request>
>           <UserBemsID>{tree2.selectedItem.UserBemsID}</UserBemsID>
>         </mx:request>
>       </mx:operation>
>     </mx:WebService>
> **** and the snippet of the tree... ***
> <mx:Tree height="420" 
> change="selectedNode=POCservice1.getuserinfo.send()" width="340" 
> backgroundColor="#8B9393" id="tree1" initialize="initTree()">
>             <mx:dataProvider>
>                 <mx:XML>
>                                       <node label="Aeroelasticity" 
> data="This selection contains Flutter Analysis, Static Aeroelastic 
> Analysis &amp; Aeroservoelastic Analysis">
>                         <node label="Flutter Analysis" data="This 
> selection can be expanded">
>                             <node label="Aero Modeling (Subsonic)" 
> data="XXXX" UserBemsID="111111"/>
> 
> Want to pass UserBemsID up to webservice, but can't seem to get 
that 
> to happen...
> can anyone see what I am doing wrong....
> Craig




--
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



 






--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to