显示包含 XMLListCollection 的列表
我是一名 Flex 菜鸟,上周我一直在与这个问题作斗争,现在我已经束手无策了。
打开了以下 XML 文件
<root>
<person>
<city-of-death>asdf</city-of-death>
<place-of-death>qwert</place-of-death>
</person>
<person>
<city-of-death>hjkl</city-of-death>
<place-of-death>yuio</place-of-death>
</person>
</root>
我已经使用以下代码
[Bindable]
private var people:XMLListCollection;
private function resultHandler(event:ResultEvent):void {
people = new XMLListCollection(event.result.person);
}
,并尝试使用以下 mxml 显示它
<s:List left="0" height="94" dataProvider="{people}" labelField="@city-of-death" width="144" y="-1"></s:List>
本质上,我希望有一个显示列表...但没有显示任何内容,
asdf
hjkl
如果有人可以提供帮助,我将非常感激。我要拔掉我的头发!
I'm a Flex noob and I've been struggling with this problem for a last week, and I'm at my wits end.
I have opened the following XML file
<root>
<person>
<city-of-death>asdf</city-of-death>
<place-of-death>qwert</place-of-death>
</person>
<person>
<city-of-death>hjkl</city-of-death>
<place-of-death>yuio</place-of-death>
</person>
</root>
Using the following code
[Bindable]
private var people:XMLListCollection;
private function resultHandler(event:ResultEvent):void {
people = new XMLListCollection(event.result.person);
}
and am trying to display it using for following mxml
<s:List left="0" height="94" dataProvider="{people}" labelField="@city-of-death" width="144" y="-1"></s:List>
Essentially, I'm hoping to have a list displaying ... but there is nothing displayed
asdf
hjkl
I would be so incredibly grateful if someone could help. I am pulling out my hair!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
@
符号用于属性。尝试使用类似的东西:@
sign is for attributes. Try to use something like: