急求帮助

shuang__zi 2013-10-03 09:08:41
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="100%" height="100%" creationComplete="init(event)">

<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.events.FlexEvent;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
[Bindable]
var dormList:ArrayCollection=new ArrayCollection();
var bednum:ArrayCollection=new ArrayCollection();
protected function init(event:FlexEvent):void
{
dormAction.addEventListener(FaultEvent.FAULT,failed);
dormAction.addEventListener(ResultEvent.RESULT,listDormSuccess);
dormAction.listAllRoom("男生宿舍");
//Alert.show(dormAction.listAllRoom("男生宿舍"));


}

protected function failed(event:FaultEvent):void
{
Alert.show("网络不通");
Alert.show(event.toString());
}

protected function listDormSuccess(event:ResultEvent):void
{
dormList=event.result as ArrayCollection;
}

]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<s:RemoteObject id="dormAction" destination="dormAction">
</s:RemoteObject>
</fx:Declarations>


<mx:TabNavigator id="tabdorm" width="100%" height="100%">










<s:NavigatorContent width="100%" height="100%" label="统计表格">
<s:HGroup x="0" y="0" width="738" height="29">
<s:Button width="79" height="28" label="导出"/>
</s:HGroup>
<s:HGroup x="0" y="28" width="100%" height="145">
<s:DataGrid dataProvider="{dormList}"width="100%"height="100%" requestedRowCount="4" >
<mx:columns>
<mx:DataGridColumn dataField="useto" headerText="use to ">
</mx:DataGridColumn>
<mx:DataGridColumn dataField="number" headerText="number">
</mx:DataGridColumn>
</mx:columns>

</s:DataGrid>
</s:HGroup>
</s:NavigatorContent>
</mx:TabNavigator>
</mx:VBox>



为什么的总是提示 无法将“<mx:columns>”解析为组件执行。

...全文
140 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
shuang__zi 2013-10-07
  • 打赏
  • 举报
回复
谢谢相助
niss 2013-10-06
  • 打赏
  • 举报
回复
引用 楼主 shuang__zi 的回复:
<?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" creationComplete="init(event)"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.events.FlexEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; [Bindable] var dormList:ArrayCollection=new ArrayCollection(); var bednum:ArrayCollection=new ArrayCollection(); protected function init(event:FlexEvent):void { dormAction.addEventListener(FaultEvent.FAULT,failed); dormAction.addEventListener(ResultEvent.RESULT,listDormSuccess); dormAction.listAllRoom("男生宿舍"); //Alert.show(dormAction.listAllRoom("男生宿舍")); } protected function failed(event:FaultEvent):void { Alert.show("网络不通"); Alert.show(event.toString()); } protected function listDormSuccess(event:ResultEvent):void { dormList=event.result as ArrayCollection; } ]]> </fx:Script> <fx:Declarations> <!-- 将非可视元素(例如服务、值对象)放在此处 --> <s:RemoteObject id="dormAction" destination="dormAction"> </s:RemoteObject> </fx:Declarations> <mx:TabNavigator id="tabdorm" width="100%" height="100%"> <s:NavigatorContent width="100%" height="100%" label="统计表格"> <s:HGroup x="0" y="0" width="738" height="29"> <s:Button width="79" height="28" label="导出"/> </s:HGroup> <s:HGroup x="0" y="28" width="100%" height="145"> <s:DataGrid dataProvider="{dormList}"width="100%"height="100%" requestedRowCount="4" > <mx:columns> <mx:DataGridColumn dataField="useto" headerText="use to "> </mx:DataGridColumn> <mx:DataGridColumn dataField="number" headerText="number"> </mx:DataGridColumn> </mx:columns> </s:DataGrid> </s:HGroup> </s:NavigatorContent> </mx:TabNavigator> </mx:VBox> 为什么的总是提示 无法将“<mx:columns>”解析为组件执行。
<s:DataGrid> <s:columns> <s:ArrayList> <s:GridColumn .... /> <s:GridColumn .... /> 。。。。 <s:ArrayList> </s:columns> </s:DataGrid>

4,328

社区成员

发帖
与我相关
我的任务
社区描述
多媒体/设计 Flex
社区管理员
  • Flex
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧