Flex Mobile 如何将信息从第一页(List.selectedItem)传递到第三页?
我有 3 个页面视图,
- HomeView
- ViewPg02
- ViewPg03
在 HomeView 中,有一个列表控件,当用户选择一个项目时,它将转到 ViewPg02
protected function myList_changeHandler(event:IndexChangeEvent):void {
navigator.pushView(views.ViewPg02, myList.selectedItem, null); }
在 ViewPg02 中,有一个图像控件,它从 myList.selectedItem 获取图像显示信息
<s:Image id="imageScreen1" width="100%" height="100%"
source="images/{data.image}"
,当用户单击图片时,它将转到 ViewPg03,代码如下:
protected function imageScreen_clickHandler(event:MouseEvent):void {
navigator.pushView(ViewPg03);
}
问题:我在 ViewPg03 中得到一个空白页,然后我无法在 ViewPg02 中使用 myList.selectedItem。
如何使 ViewPg02 中的相同图像显示在 ViewPg03 中?
谢谢。
I have 3 pages view,
- HomeView
- ViewPg02
- ViewPg03
In HomeView, has a List control and when user select an item it will goes to ViewPg02
protected function myList_changeHandler(event:IndexChangeEvent):void {
navigator.pushView(views.ViewPg02, myList.selectedItem, null); }
In ViewPg02, has an image control and it get the image display info from myList.selectedItem
<s:Image id="imageScreen1" width="100%" height="100%"
source="images/{data.image}"
and when user click on the picture, it will go to ViewPg03 with the following code:
protected function imageScreen_clickHandler(event:MouseEvent):void {
navigator.pushView(ViewPg03);
}
Problem: I get a blank page in ViewPg03 and I can’t use myList.selectedItem in ViewPg02.
How do it get the same image in ViewPg02 to display in ViewPg03 ?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能继续将数据传递到第 3 页吗?
执行此操作会将
data
属性再次传递到第三页,您可以以相同的方式显示图像。或者我错过了什么?Can't you just continue to pass the data along to page 3?
Doing this will pass the
data
property again to page three and you can display the image the same way. Or am I missing something?