Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. <xp:inputText id="quickSelectEntry" style="width:170px;">
  2. <xp:this.dojoAttributes>
  3. <xp:dojoAttribute name="placeHolder" value="Enter name">
  4. </xp:dojoAttribute>
  5. </xp:this.dojoAttributes>
  6. <xp:typeAhead mode="none" minChars="2" ignoreCase="true"
  7. var="searchValue" valueMarkup="true">
  8. <xp:this.valueList><![CDATA[#{javascript:return nameTypeAhead(searchValue)}]]></xp:this.valueList>
  9. </xp:typeAhead>
  10.  
  11. <xp:eventHandler event="onchange" submit="true"
  12. refreshMode="norefresh">
  13. <xp:this.action>
  14. <xp:actionGroup>
  15. <xp:executeScript>
  16. <xp:this.script><![CDATA[#{javascript:var searchVal:string = getComponent("quickSelectEntry").getValue();
  17. if (searchVal.substr(0,1).equals("?")) {
  18. context.redirectToPage("xCheckSecurityGroup.xsp?group=" + searchVal.substr(1));
  19. return false;
  20. } else {
  21. var doc:NotesDocument = quickLookupView.getDocumentByKey(searchVal, true);
  22. if (null != doc) {
  23. viewScope.lookupKey = doc.getUniversalID();
  24. viewScope.lookupForm = doc.getItemValueString("form");
  25. return true;
  26. } else {
  27. viewScope.lookupKey = ""
  28. viewScope.lookupForm = ""
  29. return false;
  30. }
  31. }
  32. ]]></xp:this.script>
  33. </xp:executeScript>
  34. <xp:actionGroup>
  35. <xp:this.condition><![CDATA[#{javascript:viewScope.lookupKey != ""}]]></xp:this.condition>
  36.  
  37. <xp:openPage target="openDocument"
  38. documentId="#{javascript:return viewScope.lookupKey}">
  39. <xp:this.name><![CDATA[#{javascript:return "x" + viewScope.lookupForm + ".xsp" }]]></xp:this.name>
  40. </xp:openPage>
  41. </xp:actionGroup>
  42. </xp:actionGroup>
  43. </xp:this.action>
  44. </xp:eventHandler>
  45.  
  46. <xp:div id="keepSessionAlive"></xp:div>
  47. <xp:scriptBlock id="scriptBlock1">
  48. <xp:this.value>
  49. <![CDATA[
  50. XSP.addOnLoad(function(){
  51. setInterval(function(){
  52. XSP.partialRefreshPost("#{id:keepSessionAlive}", {});
  53. }, 300000)
  54. })]]>
  55. </xp:this.value>
  56. </xp:scriptBlock>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement