XPages Mobile OptionsHere are several things I've learned from doing some XPages Mobile development over the last few weeks.
Normally, with a mobile application, you want to have everything loaded up once and then open up different pages without another trip to the server. In my case, the nature of my application leads it to have different parts of the mobile application be different XPages (because there are so many different options - one page would take forever to load).
So, keeping in mind that multiple XPages are used to navigate around, here's the things I learned.
(1) On the title bar (<xe:djxmHeading>) if you want the "Back" button on the left to go to a different page, add a child "href" attribute, as in:
<xe:djxmHeading id="djxmHeading1" label="Administration" back="Home">
(2) On the title bar (<xe:djxmHeading>) if you want a button to appear on the right, that is done through an Action Facet panel:
<xp:button id="btnLogout" value="Logout">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[window.location = thisURL + "?logout&redirectTo=/" + webDbName + "/mobile.xsp";]]></xp:this.script>
(3) If you want a list item that goes to another page, that is done through a Dojo attribute on the line item (which I previously described here):
<xe:djxmLineItem id="djxmLineItem1" label="More Information">
<xp:dojoAttribute name="href" value="mobileMoreInfo.xsp">
<xe:djxmLineItem id="djxmLineItem3" label="Prompt and Redirect">
<xp:dojoAttribute name="clickable" value="true">
<xp:dojoAttribute name="onclick" value="promptAndRedirect();">