Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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>
- <xp:div id="keepSessionAlive"></xp:div>
- <xp:scriptBlock id="scriptBlock1">
- <xp:this.value>
- <![CDATA[
- XSP.addOnLoad(function(){
- setInterval(function(){
- XSP.partialRefreshPost("#{id:keepSessionAlive}", {});
- }, 300000)
- })]]>
- </xp:this.value>
- </xp:scriptBlock>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement