flex-在选项卡选择中加载选项卡数据. [英] flex - load tabbar data on tab selection.

查看:130
本文介绍了flex-在选项卡选择中加载选项卡数据.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..
我正在使用具有六个选项卡的flex spark TabBar组件(NavigatorContent组件),现在当我加载具有TabBar的页面时,它将在页面加载时加载所有六个NavigatorContent组件的数据.被选中.我该怎么办?
我正在使用如下所示的标签栏

Hi..
i am using flex spark TabBar component having six tab(NavigatorContent components),now when i am loading page having TabBar it loads all six NavigatorContent components'' data at page load time.but i want that NavigatorContent data should be loaded only when particular tab is selected. how can i do this?
i am using tabbar as shown below

<s:tabbar dataprovider="{vsPatientInformation}" width="100%" height="100%" xmlns:s="#unknown">
			<s:layout>
				<s:horizontallayout gap="5"></s:horizontallayout>
			</s:layout>
		</s:tabbar>
		<mx:viewstack id="vsPatientInformation" height="100%" width="100%" xmlns:mx="#unknown">
				<comp:first label="First" width="100%" xmlns:comp="#unknown"></comp:first> // navigatorContent component
				<comp:second label="Second" width="100%" xmlns:comp="#unknown"></comp:second>  // navigatorContent component
				<comp:third label="Third" width="100%" xmlns:comp="#unknown"></comp:third> // navigatorContent component
		</mx:viewstack>

推荐答案

您如何实现标签栏?您要加载哪种数据? GUI组件或外观中的其他数据?

处理TabBar控件事件@ adobe.com [ Tabbar @ adobe.com [
how did you implement the tabbar? What kind of data do you want to load? the GUI components or additional data from the facade?

Handling TabBar control events @ adobe.com[^]

Tabbar @ adobe.com[^]

You need to refer to the function
private function clickEvt(event:ItemClickEvent):void { }



并在该事件上加载数据.



and load the data on that event.


这篇关于flex-在选项卡选择中加载选项卡数据.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆