I'm having problemes accessing clicked branches in trees. I tried many
thing but I keep stumbling on undefined items.
Here are piƩces of my code:
------------------------------------- the UI tree component
-------------------------------
<mx:Tree id="employeeTree" dataProvider="{treeHttpSrv.result}"
width="100%" nodeOpen="dataController.onTreeClick(employeeTree)"
height="100%"/>
----------------------------------- the httpservice which works
----------------------------
<mx:HTTPService
id="treeHttpSrv"
concurrency="multiple"
method="GET"
url="" href="http://localhost:8084/FlexXMLServer/XMLTreeElementsServlet">http://localhost:8084/FlexXMLServer/XMLTreeElementsServlet"
showBusyCursor="true"
fault="alert(event.fault.faultstring);"/>
--------------------------------- the format of the XML object send by
the servlet---------
<Albums>
<label>Albums</label>
<nomAlbum>
<label>BMW</label>
<nomPhoto>
<label>BMW 325ci 1994</label>
<urlPhoto>http://localhost:8080/FlexXMLServer/Photos/BMW/BMW
325ci 1994.jpeg</urlPhoto>
</nomPhoto>
</nomAlbum>
</Albums>
------------------------------- the DataController function
-------------------------------
public function onTreeClick(event):Void
{
trace(event.selectedItem);
}
It seems I can't get a proper handler on the tree so I can extract the
urlPhoto attriburte from the xml.
Could someone please redirect me to some working examples or give some tips?
Thank,
--
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.