Вопрос

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.

Это было полезно?

Решение

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>

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

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

computed back button demo markup on XSnippets

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top