• XPages mobile app

    By Kevin Lau 1 decade ago

    Hi, I've a mobile page developed with ExtLib mobile controls: http://hostname/mydb.nsf/MobileTest.xsp

    The page consists of two appPages (i.e. a "mainPage" appPage & a "subPage" appPage).

    Click on an entry in the mainPage will move to the subPage. Click on the "Done" button in the subPage will move back to the mainPage. After moving back to the mainPage, the resulting URL will automatically change to: http://hostname/mydb.nsf/MobileTest.xsp#mainPage&resetContent=false

    When this happened, if I press the browser's refresh button on my iPhone, instead of showing the mainPage, a grey blank page will be displayed. This is not the desired result.

    Then, if I manually remove &resetContent=false from the URL and press the refresh button again, the mainPage will be displayed properly.

    So, is there any way to suppress appending &resetContent=false (or true) after clicking on a Done button?

    • Sample code

      By Kevin Lau 1 decade ago

      xml version="1.0" encoding="UTF-8"?>

      <xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">

      <xp:this.resources>

      <xp:metaData name="Cache-Control" content="no-cache">xp:metaData>

      <xp:metaData name="Pragma" content="no-cache">xp:metaData>

      xp:this.resources>

      <xe:singlePageApp id="xpagesMobileApp" selectedPageName="mainPage">

      <xe:appPage id="appPage1" pageName="mainPage" resetContent="true">

      <xe:djxmLineItem id="lineItem1" moveTo="#subPage" transition="slide">

      <xp:label value="Move to subPage" id="label1">xp:label>

      xe:djxmLineItem>

      xe:appPage>

      <xe:appPage id="appPage2" pageName="subPage" resetContent="true">

      <xe:djxmHeading id="djxmHeading2" label="SubPage" back="Cancel" moveTo="#mainPage">

      <xp:this.facets>

      <xp:panel xp:key="actionFacet">

      <xp:button value="Done" id="button1">

      <xp:eventHandler event="onclick" submit="true">

      <xp:this.action>

      <xp:actionGroup>

      <xe:moveTo direction="Right to Left" targetPage="mainPage" transitionType="slide">

      xe:moveTo>

      xp:actionGroup>

      xp:this.action>

      xp:eventHandler>

      xp:button>

      xp:panel>

      xp:this.facets>

      xe:djxmHeading>

      xe:appPage>

      xe:singlePageApp>

      xp:view>

    • Not currently possible

      By Simon McLoughlin 1 decade ago

      Hi Kevin,

      No it is not currently possible to say whether or not that gets appended to the URL. I will take a look at this issue as I haven't seen it before.

      Is this an issue you are facing in your app? as I'm not sure if the user would need to press the refresh button so it may not be an issue.

      if it is affecting you I posted an example in the below link on how to compute the selectedPageName property of a singlePageApp, perhaps this could be used as a work around if it is affecting you.

      http://www-10.lotus.com/ldd/xpagesforum.nsf/topicThread.xsp?action=openDocument&documentId=E2054B1AC9286DAF852579B200392AEA#926520CDD47E435D852579D5002EB446

      • not a big issue,but nice to investigate

        By Kevin Lau 1 decade ago

        Hi Simon,

        It's not a big issue in my app, as I think in general users would not need to press the refresh button. However, it would be nice if it's possible to avoid having the potential grey blank screen, as users may get confused.

        Thanks,
        Kevin