Note that there are some explanatory texts on larger screens.

plurals
  1. POXPages Mobile Control Partial refresh returns to menu page
    text
    copied!<p>I have a simple page inside mobile controls. I have an edit box and what I want to happen is to a partial refresh of the current in the onChange event of the edit control. Basically type something in the edit control - hit enter and do the partial refresh. What's happening is hitting enter if returning the page to the main menu. If I put a value in and hit TAB then it works as I would want.</p> <p>I'm starting a new app from scratch. But I've done this concept many times with an app in production. I can't find anything special in the code that would "trap" an enter button... So I'm at a loss why I can't get the behavior I want this time around.</p> <p>Here's a video demo of the problem: <a href="http://traffic.libsyn.com/notesin9/SO-Question2-HB.mp4" rel="nofollow">http://traffic.libsyn.com/notesin9/SO-Question2-HB.mp4</a></p> <p>Below is the full code.</p> <p>Thanks for any help!!</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex" xmlns:xc="http://www.ibm.com/xsp/custom"&gt; &lt;xp:this.resources&gt; &lt;xp:styleSheet href="/.ibmxspres/dojoroot/dijit/themes/tundra/tundra.css"&gt; &lt;/xp:styleSheet&gt; &lt;xp:styleSheet href="/mobile.css"&gt;&lt;/xp:styleSheet&gt; &lt;/xp:this.resources&gt; &lt;xe:singlePageApp id="singlePageApp1" selectedPageName="mainMenu"&gt; &lt;xe:djxmHeading id="djxmHeading1" label="My App"&gt;&lt;/xe:djxmHeading&gt; &lt;xe:appPage id="mainMenuID" pageName="mainMenu"&gt; &lt;xe:djxmRoundRectList id="djxmRoundRectList1" title="Main Menu"&gt; &lt;xe:djxmLineItem id="djxmLineItem9" moveTo="#container" label="Test Page"&gt; &lt;/xe:djxmLineItem&gt; &lt;/xe:djxmRoundRectList&gt; &lt;/xe:appPage&gt; &lt;xe:appPage id="containerID" pageName="container" resetContent="true"&gt; &lt;xe:djxmHeading id="djxmHeading5" label="My Page" back="Main Menu"&gt; &lt;/xe:djxmHeading&gt; &lt;xe:djxmRoundRectList id="djxmRoundRectList2"&gt; &lt;xp:panel id="mainPanel"&gt; &lt;xp:table style="width:100.0%"&gt; &lt;xp:tr&gt; &lt;xp:td style="width:50%"&gt;&lt;/xp:td&gt; &lt;xp:td&gt;Details&lt;/xp:td&gt; &lt;/xp:tr&gt; &lt;xp:tr&gt; &lt;xp:td&gt; &lt;xp:inputText id="inputText1" styleClass="target alignVMiddle" value="#{sessionScope.myValue}"&gt; &lt;xp:this.attrs&gt; &lt;xp:attr name="autocorrect" value="off"&gt;&lt;/xp:attr&gt; &lt;xp:attr name="placeholder" value="Tap to Scan..."&gt; &lt;/xp:attr&gt; &lt;/xp:this.attrs&gt; &lt;xp:eventHandler event="onchange" submit="true" refreshMode="complete"&gt; &lt;xp:this.action&gt;&lt;![CDATA[#{javascript:viewScope.put("test", "test");}]]&gt;&lt;/xp:this.action&gt; &lt;/xp:eventHandler&gt; &lt;/xp:inputText&gt; &lt;/xp:td&gt; &lt;xp:td&gt;&lt;/xp:td&gt; &lt;/xp:tr&gt; &lt;/xp:table&gt; &lt;xp:br&gt;&lt;/xp:br&gt; Current Value:&amp;#160; &lt;xp:text escape="true" id="computedField1" value="#{sessionScope.myValue}"&gt;&lt;/xp:text&gt; &lt;xp:br&gt;&lt;/xp:br&gt; &lt;xp:br&gt;&lt;/xp:br&gt; Current Time:&amp;#160; &lt;xp:text escape="true" id="computedField2" value="#{javascript:@Now();}"&gt; &lt;xp:this.converter&gt; &lt;xp:convertDateTime type="time"&gt;&lt;/xp:convertDateTime&gt; &lt;/xp:this.converter&gt; &lt;/xp:text&gt; &lt;/xp:panel&gt; &lt;/xe:djxmRoundRectList&gt; &lt;/xe:appPage&gt; &lt;/xe:singlePageApp&gt; &lt;/xp:view&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload