XPages Mobile Controls - How to Program the Back Button

XPages Mobile Controls provides an easy way to mobilize Notes / Domino data. However, if you say 3 different views that help point the user to a specific entry, the back button that you add to your app page that allows users to view / edit the document can only be pointed to a specific app page. What's the best way to create a programmable back button based on the view the user logged in through.

+3


source to share


1 answer


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 region to the mobile page that you navigated from from the current mobile page.

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

      

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



To set the scope, use the rendered property in the title control for each mobile "view" page so that a value is set every time those pages are loaded or changed to a scoped variable. Try the following link to get complete demo markup from OpenNTF XSnippets

computed demo markup for back button on XSnippets

+8


source







All Articles