Actionscript 3 将数据推送到视图中的选项卡ViewNavigator中
我在Flex mobile应用程序中有这样的视图:Actionscript 3 将数据推送到视图中的选项卡ViewNavigator中,actionscript-3,apache-flex,mobile,flash-builder,flex4.5,Actionscript 3,Apache Flex,Mobile,Flash Builder,Flex4.5,我在Flex mobile应用程序中有这样的视图: <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="aaa" actionBarVisible="false" creationComplete="view1_creationCompleteHandler(event)"> <fx:Declarations>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="aaa" actionBarVisible="false" creationComplete="view1_creationCompleteHandler(event)">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import valueObjects.Hasta;
import mx.events.FlexEvent;
public var gelen:Hasta= new Hasta();
protected function view1_creationCompleteHandler(event:FlexEvent):void
{
// TODO Auto-generated method stub
gelen=data as Hasta;
}
]]>
</fx:Script>
<s:TabbedViewNavigator width="100%" height="110%">
<s:ViewNavigator id="vn1" label="Hasta bilgileri-Hasta Yatış Bilgileri" width="100%" height="100%" firstView="views.HastabilgileriView" />
<s:ViewNavigator id="vn2" label="Menu-Doktor Bilgileri" width="100%" height="100%" firstView="views.MenuView"/>
</s:TabbedViewNavigator>
我想将数据(gelen)发送到选项卡视图(to views.hastabilgilerieview/views.MenuView)我该怎么做?要在视图之间推送数据,可以使用:
navigator.pushView(views.SomeView, data);
看看这个,如果你想要更多的信息,看看下面。我认为这些链接将为您提供完成任务所需的信息。请尝试以下方法:
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="aaa" actionBarVisible="false" creationComplete="view1_creationCompleteHandler(event)">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import valueObjects.Hasta;
import mx.events.FlexEvent;
[Bindable]
public var gelen:Hasta= new Hasta();
protected function view1_creationCompleteHandler(event:FlexEvent):void
{
// TODO Auto-generated method stub
gelen=data as Hasta;
}
]]>
</fx:Script>
<s:TabbedViewNavigator width="100%" height="110%">
<s:ViewNavigator id="vn1" label="Hasta bilgileri-Hasta Yatış Bilgileri" width="100%" height="100%" firstView="views.HastabilgileriView" firstViewData="{gelen}" />
<s:ViewNavigator id="vn2" label="Menu-Doktor Bilgileri" width="100%" height="100%" firstView="views.MenuView" firstViewData="{gelen}"/>
</s:TabbedViewNavigator>
我知道。但我的示例与选项卡导航器的下一个视图的视图不同。