XPage 移动控件 - 如何对“后退"按钮进行编程 [英] XPages Mobile Controls - how to program the Back button

查看:25
本文介绍了XPage 移动控件 - 如何对“后退"按钮进行编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

XPage 移动控件提供了一种移动 Notes/Domino 数据的简单方法.但是,如果您说 3 个不同的视图可以帮助将用户指向特定记录,则您添加到 appPage 的返回"按钮允许用户查看/编辑文档只能指向特定的 appPage.考虑到用户进入的视图,创建可编程后退按钮的最佳方法是什么?

The XPages Mobile Controls provide an easy way to mobilize Notes/Domino data. However, if you have say 3 different views that help point a user to a specific record, the "Back" button you add to your appPage that allows users to view/edit the document can only be pointed back to a specific appPage. What's the best way to create a programmable Back button taking into account the view that the user came in via.

推荐答案

移动页面上的后退按钮可以像任何其他 XPage 属性一样动态计算.
试试这个,例如,您可以将范围设置为您导航到当前移动页面的移动页面.

The back button on a mobile page can be computed dynamically just like any other XPage property.
Try this for example where you can set the scope to a mobile page you've navigated from to the current mobile page.

 <xp:this.moveTo>
<![CDATA[#{javascript:var from = sessionScope.get("from"); return
from;
}]]>
</xp:this.moveTo>

这与它们的移动应用程序的 Discussion XL 和 TeamRoom XL 模板中使用的技术相同.

This is the same technique that is used in the Discussion XL and TeamRoom XL templates for their mobile apps.

要设置范围,请在每个视图"移动页面的标题控件中使用呈现的属性,以便每次加载或交换这些页面时设置范围变量.尝试使用以下链接从 OpenNTF XSnippets 获取完整的演示标记

To set the scope use the rendered property in the heading control for each 'view' mobile page so every time these pages are loaded or swapped to the scoped variable is set. Try the following link to get the full demo markup from OpenNTF XSnippets

计算回来XSnippets 上的按钮演示标记

这篇关于XPage 移动控件 - 如何对“后退"按钮进行编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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