I have a typeahead enabled on an inputText field which triggers an onChange event. This works fine unless the page has not been refreshed for a period of time (in testing, it stops working after 1 hour but may be less). Refreshing the page completely fixes the issue.
The code for the inputText field is as follows;
<xp:inputText id="quickSelectEntry" style="width:170px;">
<xp:this.dojoAttributes>
<xp:dojoAttribute name="placeHolder" value="Enter name">
</xp:dojoAttribute>
</xp:this.dojoAttributes>
<xp:typeAhead mode="none" minChars="2" ignoreCase="true"
var="searchValue" valueMarkup="true">
<xp:this.valueList><![CDATA[#{javascript:return nameTypeAhead(searchValue)}]]></xp:this.valueList>
</xp:typeAhead>
<xp:eventHandler event="onchange" submit="true"
refreshMode="norefresh">
<xp:this.action>
<xp:actionGroup>
<xp:executeScript>
<xp:this.script><![CDATA[#{javascript:var searchVal:string = getComponent("quickSelectEntry").getValue();
if (searchVal.substr(0,1).equals("?")) {
context.redirectToPage("xCheckSecurityGroup.xsp?group=" + searchVal.substr(1));
return false;
} else {
var doc:NotesDocument = quickLookupView.getDocumentByKey(searchVal, true);
if (null != doc) {
viewScope.lookupKey = doc.getUniversalID();
viewScope.lookupForm = doc.getItemValueString("form");
return true;
} else {
viewScope.lookupKey = ""
viewScope.lookupForm = ""
return false;
}
}
]]></xp:this.script>
</xp:executeScript>
<xp:actionGroup>
<xp:this.condition><![CDATA[#{javascript:viewScope.lookupKey != ""}]]></xp:this.condition>
<xp:openPage target="openDocument"
documentId="#{javascript:return viewScope.lookupKey}">
<xp:this.name><![CDATA[#{javascript:return "x" + viewScope.lookupForm + ".xsp" }]]></xp:this.name>
</xp:openPage>
</xp:actionGroup>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
So far I've tried doing a timed partial refresh of the containing panel with no joy, I've set the typeahead mode from none to full. No difference.
Aside from refreshing the page every 10 minutes, is there anything else that couple be causing the problem. FYI The actual typeahead is working correctly consistently, its just the onchange event that stops firing.