HTTPService data into a tree

已查看 26 次
跳至第一个未读帖子

Fahad javed

未读,
2008年3月4日 02:03:112008/3/4
收件人 flex_...@googlegroups.com
I have an HTTPService which provides a data I want to show in a tree.

I have worked out the example of having an XMLList into a tree.

The source JSP is generting the following data:

<?xml version="1.0" encoding="utf-8"?>

<node label="Mail Box">
<node label="Inbox">
<node label="Marketing"/>
<node label="Product Management"/>
<node label="Personal"/>
</node>
            <node label="Outbox">
<node label="Professional"/>
<node label="Personal"/>
</node>
<node label="Spam"/>
<node label="Sent"/>
</node>
The code for defining HTTPService is
 <mx:HTTPService id="srv2" url="receipientList.jsp">
 </mx:HTTPService>

The code for tree is

     <mx:Tree id="dateSelectionTree"  
         x="200" y="300" labelField="@label"
                showRoot="false" dataProvider="{srv2.lastResult}"  width="100%" height="100%" />

The result however prints out [object Object] in the tree.

What am I doing wrong?

Thanks for your time

Fahad

Kalpataru Roy

未读,
2008年3月4日 04:28:212008/3/4
收件人 flex_...@googlegroups.com
Please try :

    <mx:HTTPService id="lsrv2"
        url="receipientList.jsp"
        method="POST" useProxy="false"
        resultFormat="e4x"
        />

{srv2.lastResult} ==> ok you can also try for {srv2.result}
--
Kalpataru Roy
Mobile :+919850021354

kumar

未读,
2008年3月4日 05:35:022008/3/4
收件人 Flex India Community
the dataProvider property value in the Tree control is wrongly
specified as per your XML page , the value is
dataProvider="{srv2.lastResult.node.node}" labelField="label" and
remaining are all same, it will work now.

regards,
kumar.
回复全部
回复作者
转发
0 个新帖子