defineCondition.xts 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2013
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/AGS.xml,messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseEventStudio">
  9. <!--
  10. ===============================================================================================
  11. processRequestParams - Default any params that weren't passed in. Also this is where we would
  12. do validation (when time permits).
  13. ===============================================================================================
  14. -->
  15. <xts:block id="processRequestParams" processor="XSLT" type="exec" nodeList="/root/*[local-name()='requestParams']">
  16. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl">
  17. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  18. <xsl:template match="/">
  19. <xts:sequence>
  20. <xts:append select="/root/*[local-name()='requestParams']">
  21. <xts:transform src="portal/controls/gen_default_parameters.xslt" processor="XSLT">
  22. <root>
  23. <xts:transform name="XML">
  24. <xts:param name="systemId">ags/defineCondition_API.xml</xts:param>
  25. </xts:transform>
  26. <xsl:copy-of select="/root/*[local-name()='requestParams']"/>
  27. </root>
  28. </xts:transform>
  29. </xts:append>
  30. </xts:sequence>
  31. </xsl:template>
  32. </xsl:stylesheet>
  33. </xts:block>
  34. <!--
  35. ===============================================================================================
  36. returnResult - We're done with the email options morphlet, so return the appropriate response
  37. ===============================================================================================
  38. -->
  39. <xts:block id="returnResult" dependency="processRequestParams" type="exec" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'next' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'back' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'canceled']" mandatory="false">
  40. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" exclude-result-prefixes="xsl xos">
  41. <xsl:output method="xml" encoding="utf-8" indent="no"/>
  42. <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
  43. <xsl:template match="/">
  44. <xts:sequence>
  45. <xts:append select="/root/output">
  46. <xts:transform name="Null" option="part" mimeType="text/xml">
  47. <xsl:element name="{key('request-param','resultNode')}" namespace="">
  48. <xsl:choose>
  49. <xsl:when test="/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'canceled'">
  50. <canceled/>
  51. </xsl:when>
  52. <xsl:otherwise>
  53. <xsl:variable name="detailExpression" select="/root/env/param[@name='detailExpression']"/>
  54. <xsl:variable name="summaryExpression" select="/root/env/param[@name='summaryExpression']"/>
  55. <!-- place a response here -->
  56. <tabResult>
  57. <xsl:value-of select="/root/env/param[@name='AgentTask-condition']"/>
  58. <!--xsl:if test="$detailExpression != ''">
  59. <xts:transform name="XMLEncode">
  60. <detailFilters>
  61. <detailFilter use="required" postAutoAggregation="false">
  62. <filterExpression><xsl:value-of select="$detailExpression"/></filterExpression>
  63. </detailFilter>
  64. </detailFilters>
  65. </xts:transform>
  66. </xsl:if>
  67. <xsl:if test="$summaryExpression != ''">
  68. <xts:transform name="XMLEncode">
  69. <summaryFilters>
  70. <summaryFilter use="required">
  71. <filterExpression><xsl:value-of select="$summaryExpression"/></filterExpression>
  72. </summaryFilter>
  73. </summaryFilters>
  74. </xts:transform>
  75. </xsl:if-->
  76. </tabResult>
  77. <param name="conditionSummary" selectedTab="{/root/env/param[@name='rp_selected_tab']}">
  78. <xsl:text/>
  79. <xsl:variable name="both">
  80. <xsl:if test="$detailExpression != '' and $summaryExpression != ''"> and </xsl:if>
  81. </xsl:variable>
  82. <xsl:choose>
  83. <xsl:when test="$both=' and '">
  84. <xsl:text>(</xsl:text><xsl:value-of select="$detailExpression"/><xsl:text>)</xsl:text><xsl:value-of select="$both"/><xsl:text>(</xsl:text><xsl:value-of select="$summaryExpression"/><xsl:text>)</xsl:text>
  85. </xsl:when>
  86. <xsl:otherwise>
  87. <xsl:value-of select="$detailExpression"/><xsl:value-of select="$both"/><xsl:value-of select="$summaryExpression"/>
  88. </xsl:otherwise>
  89. </xsl:choose>
  90. <xsl:text/>
  91. </param>
  92. </xsl:otherwise>
  93. </xsl:choose>
  94. </xsl:element>
  95. </xts:transform>
  96. </xts:append>
  97. </xts:sequence>
  98. </xsl:template>
  99. </xsl:stylesheet>
  100. </xts:block>
  101. <!--
  102. ===============================================================================================
  103. processRequestParams - Default any params that weren't passed in. Also this is where we would
  104. do validation (when time permits).
  105. ===============================================================================================
  106. -->
  107. <xts:block id="processConditionFilters" processor="XSLT" type="exec" dependency="returnResult" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false" >
  108. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  109. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  110. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xtsext xts">
  111. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  112. <xsl:template match="/">
  113. <xts:sequence>
  114. <xsl:if test="/root/env/param[@name = 'AgentTask-condition'] and /root/env/param[@name = 'AgentTask-condition'] != ''">
  115. <xts:append select="/root">
  116. <filters>
  117. <xts:transform name="XMLDecode">
  118. <xsl:value-of select="/root/env/param[@name='AgentTask-condition']"/>
  119. </xts:transform>
  120. </filters>
  121. </xts:append>
  122. <xts:delete select="/root/env/param[@name='detailExpression']" />
  123. <xts:delete select="/root/env/param[@name='summaryExpression']" />
  124. <xts:append select="/root/env">
  125. <param name="detailExpression">
  126. <xts:transform name="XMLEncode">
  127. <xts:queryValue select="/root/filters/*[local-name()='detailFilters']/*[local-name()='detailFilter']/*[local-name()='filterExpression']"/>
  128. </xts:transform>
  129. </param>
  130. <param name="summaryExpression">
  131. <xts:transform name="XMLEncode">
  132. <xts:queryValue select="/root/filters/*[local-name()='summaryFilters']/*[local-name()='summaryFilter']/*[local-name()='filterExpression']"/>
  133. </xts:transform>
  134. </param>
  135. </xts:append>
  136. </xsl:if>
  137. <!-- Find out if we have a selected tab and create it and append it to the env params -->
  138. <xsl:if test="/root/env/param[@name = 'agent_definition_blob']">
  139. <!-- decode the agent items -->
  140. <xts:append select="/root">
  141. <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_dialogadapter001', string( /root/env/param[@name = 'agent_definition_blob'])), true() )" disable-output-escaping="yes"/>
  142. </xts:append>
  143. <xts:delete select="/root/env/param[@name='rp_selected_tab']"/>
  144. <xts:append select="/root/env">
  145. <param name="rp_selected_tab">
  146. <xts:queryValue select="/root/agent_definition/condition/@selectedTab"/>
  147. </param>
  148. </xts:append>
  149. <xts:delete select="/root/agent_definition"/>
  150. </xsl:if>
  151. </xts:sequence>
  152. </xsl:template>
  153. </xsl:stylesheet>
  154. </xts:block>
  155. <!--
  156. ===============================================================================================
  157. businessRules - Take care off any business logic to simplify the UI generation
  158. ===============================================================================================
  159. -->
  160. <xts:block id="businessRules" dependency="processConditionFilters" type="exec" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
  161. <!-- the define condition ui -->
  162. <xts:logicsheet path="ags/logicsheets/condition-ui-templates.xslt"/>
  163. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  164. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  165. xmlns:agscnd="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/condition/"
  166. exclude-result-prefixes="xsl agscnd">
  167. <xsl:output method="xml" encoding="utf-8" indent="no"/>
  168. <!--xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/-->
  169. <xsl:variable name="parameters">
  170. <xsl:copy-of select="/root/*[local-name()='requestParams']/*[local-name()='param']"/>
  171. </xsl:variable>
  172. <xsl:variable name="tab-exclusion">infoSqlTab</xsl:variable>
  173. <xsl:template match="/">
  174. <xts:sequence>
  175. <xts:append select="/root">
  176. <businessRules>
  177. <!-- browser title -->
  178. <browserTitle>
  179. <xsl:text/>
  180. <xsl:choose>
  181. <xsl:when test="$parameters/*[@name='titlePostfix'] != '' and $parameters/*[@name='inWizard']='true' ">
  182. <xts:string id="IDS_COMBINE_TITLE">
  183. <xts:param name="prefix">
  184. <xsl:value-of select="$parameters/*[@name='titlePrefix']"/>
  185. </xts:param>
  186. <xts:param name="postfix">
  187. <xsl:value-of select="$parameters/*[@name='titlePostfix']"/>
  188. </xts:param>
  189. </xts:string>
  190. </xsl:when>
  191. <xsl:otherwise>
  192. <xsl:value-of select="$parameters/*[@name='titlePrefix']"/>
  193. </xsl:otherwise>
  194. </xsl:choose>
  195. <xsl:text/>
  196. </browserTitle>
  197. <!-- get the default info tab-->
  198. <xsl:variable name="defaultInfoPaneTab" select="/root/info/infopane[@default = 'true']/infotabs/infotab"/>
  199. <!-- the tabs excluded from the information tab -->
  200. <excludedTabs>
  201. <xsl:if test="$parameters/*[@name='inWizard']='true' ">
  202. <xsl:value-of select="$tab-exclusion"/>
  203. </xsl:if>
  204. </excludedTabs>
  205. </businessRules>
  206. </xts:append>
  207. <xts:append>
  208. <tabset>
  209. <pane id="detailPane">
  210. <content id="detailExpression"/>
  211. <tabs>
  212. <tab id="detailPane" default="true">
  213. <xsl:text><xts:string id="AGENT_CONDITION_DETAIL_TAB"/></xsl:text>
  214. </tab>
  215. <tab id="summaryPane">
  216. <xsl:text><xts:string id="AGENT_CONDITION_SUMMARY_TAB"/></xsl:text>
  217. </tab>
  218. </tabs>
  219. </pane>
  220. <pane id="summaryPane">
  221. <content id="summaryExpression"/>
  222. <tabs>
  223. <tab id="detailPane">
  224. <xsl:text><xts:string id="AGENT_CONDITION_DETAIL_TAB"/></xsl:text>
  225. </tab>
  226. <tab id="summaryPane" default="true">
  227. <xsl:text><xts:string id="AGENT_CONDITION_SUMMARY_TAB"/></xsl:text>
  228. </tab>
  229. </tabs>
  230. </pane>
  231. </tabset>
  232. </xts:append>
  233. </xts:sequence>
  234. </xsl:template>
  235. </xsl:stylesheet>
  236. </xts:block>
  237. <!--
  238. ===============================================================================================
  239. genMarkup -
  240. ===============================================================================================
  241. -->
  242. <xts:block id="genMarkup" type="exec" processor="XSLT" dependency="businessRules" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' or /root/*[local-name()='morphletResponse']]" mandatory="false">
  243. <!-- logicsheets -->
  244. <!-- the define condition ui -->
  245. <xts:logicsheet path="ags/logicsheets/condition-ui-templates.xslt"/>
  246. <!-- portal specific information -->
  247. <xts:logicsheet path="logicsheets/portal.xsl"/>
  248. <!-- agent studio logicsheets -->
  249. <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
  250. <!-- Dialog specific logicsheets -->
  251. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  252. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  253. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  254. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  255. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  256. <!-- Generic logicsheets -->
  257. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  258. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  259. <!-- apply the form logic -->
  260. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  261. <!-- Prevent the href from appearing in the status bar. -->
  262. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  263. <xsl:stylesheet version="1.0"
  264. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  265. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  266. xmlns:out="http://www.w3.org/1999/XSL/Transform"
  267. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  268. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  269. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  270. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  271. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  272. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  273. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  274. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  275. xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
  276. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  277. xmlns:agscnd="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/condition/"
  278. xmlns:ags="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/condition/"
  279. xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/"
  280. xmlns:req-params="http://developer.cognos.com/schemas/request/params"
  281. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  282. exclude-result-prefixes="xts xsl cm pf xtsext lyt dp df cf cp xos dlgctrl utml agsdlg agscnd ags">
  283. <xsl:output method="xml" encoding="utf-8" indent="no"/>
  284. <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
  285. <xsl:key name="business-rules" match="/root/businessRules/*" use="local-name()"/>
  286. <pf:variables/>
  287. <xsl:variable name="ags_image_root">../ags/images/summary/</xsl:variable>
  288. <xsl:variable name="form-read-only">false</xsl:variable>
  289. <xsl:template match="/">
  290. <xts:sequence>
  291. <xts:append select="/root/output">
  292. <xos:part>
  293. <xos:entityHeader>
  294. <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
  295. </xos:entityHeader>
  296. <xos:entityBody>
  297. <xsl:element name="{key('request-param','resultNode')}" namespace="">
  298. <markup>
  299. <xts:transform name="XMLEncode">
  300. <utml:form name="pform">
  301. <!-- we don't want the maintain form maintaining vars which are being added by controller template usage -->
  302. <utml:exclusion-list>
  303. <xsl:value-of select="' AgentTask-condition detailExpression summaryExpression controller_state request_stack_wizardStack '"/>
  304. </utml:exclusion-list>
  305. <input type="hidden" name="AgentTask-condition" id="AgentTask-condition" value="{/root/env/param[@name='AgentTask-condition']}"/>
  306. <link href="{$skin_root}/ags/ags.css" type="text/css" rel="stylesheet"/>
  307. <dlgctrl:markupHelper/>
  308. <!-- create the selected tab variable -->
  309. <xsl:variable name="tab-exclusion" select="key('business-rules','excludedTabs')"/>
  310. <!-- render the interactive dialog header if this is not the wizard -->
  311. <xsl:choose>
  312. <xsl:when test="key('request-param','inWizard') = 'false'">
  313. <agsdlg:header>
  314. <dp:image>
  315. <img alt="" border="0" src="{$ags_image_root}icon_condition_24.gif"/>
  316. </dp:image>
  317. <dp:title>
  318. <xsl:value-of select="key('business-rules','browserTitle')"/>
  319. </dp:title>
  320. <dp:description>
  321. <xts:string id="AGENT_CONDITION_INTRO"/>
  322. </dp:description>
  323. </agsdlg:header>
  324. </xsl:when>
  325. <xsl:otherwise>
  326. <dp:header>
  327. <dp:title>
  328. <xsl:value-of select="key('business-rules','browserTitle')"/>
  329. </dp:title>
  330. <dp:description headerBorder="true">
  331. <xts:string id="AGENT_CONDITION_INTRO"/>
  332. </dp:description>
  333. <dp:close>
  334. <a href="#" onclick="controller_changeState('canceled'); controller_submitForm('cancel');">
  335. <dp:closeMarker/>
  336. </a>
  337. </dp:close>
  338. </dp:header>
  339. </xsl:otherwise>
  340. </xsl:choose>
  341. <!-- do the condition UI -->
  342. <lyt:layout style="1">
  343. <!-- do the expression editor and the info tabs -->
  344. <agscnd:conditionUI>
  345. <agscnd:param name="errorDiv">errorCondition</agscnd:param>
  346. <agscnd:param name="infoDiv">infoCondition</agscnd:param>
  347. </agscnd:conditionUI>
  348. </lyt:layout>
  349. <!-- footer -->
  350. <!--xsl:if test="key('request-param','displayButtons') != 'false'">
  351. <xsl:choose>
  352. <xsl:when test="key('request-param','inWizard') = 'true'">
  353. <dp:footer>
  354. <dlgctrl:wizardButtons validateFunction="validate"/>
  355. </dp:footer>
  356. </xsl:when>
  357. <xsl:otherwise>
  358. <dp:footer align="right">
  359. <df:button df:id="AGENT_CONDITION_PREVIEW_ALL_DATA_BUTTON" df:style="href" df:href="#" onclick="preview('all');"/-->
  360. <!--df:button df:id="AGENT_CONDITION_PREVIEW_LIMITED_DATA_BUTTON" df:style="href" df:href="#" onclick="preview('limited');"/>-->
  361. <!--df:button df:id="AGENT_CONDITION_COUNT_ROWS_BUTTON" df:style="href" df:href="#" onclick="preview('rows');"/>
  362. </dp:footer>
  363. </xsl:otherwise>
  364. </xsl:choose>
  365. </xsl:if-->
  366. <!-- only need the script's if we're in wizard mode - otherwise we're in dialogAdaptor mode and that includes them for us -->
  367. <xsl:if test="key('request-param','inWizard') = 'true'">
  368. <script type="text/javascript" src="../ags/dragDropHandler.js">//</script>
  369. </xsl:if>
  370. <script type="text/javascript" src="../ags/dragDropHandler.js">//</script>
  371. <script type="text/javascript">
  372. var cf = parent.getConfigFrame();
  373. function init()
  374. {
  375. //place the current tip when available in the information panel
  376. cf.updateInformationTip();
  377. // cool have a built in on load handler
  378. <xsl:for-each select="/root/tabset/pane">
  379. <xsl:variable name="name" select="./content/@id"/>
  380. droppy.registerDropZone(&quot;<xsl:value-of select="$name"/>&quot;,"",&quot;<xts:string id="AGENT_CONDITION_TIP" encode="javascript"/>&quot;,'true',&quot;<xsl:value-of select="/root/req-params:requestParams/req-params:param[@name='tabSelectedID']"/>&quot;,"",true);
  381. //Update the AgentTask-condition
  382. droppy.registerPostEventHandler(&quot;<xsl:value-of select="$name"/>&quot;, "onblur",updateFilters);
  383. droppy.registerPostEventHandler(&quot;<xsl:value-of select="$name"/>&quot;, "ondrop",someDropActionOccured);
  384. </xsl:for-each>
  385. <xsl:choose>
  386. <xsl:when test="/root/env/param[@name='rp_selected_tab'] != ''">
  387. doConditionTabChange(&quot;<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='rp_selected_tab']))"/>&quot;);
  388. </xsl:when>
  389. <xsl:otherwise>
  390. doConditionTabChange('<xsl:value-of select="/root/tabset/pane[1]/@id"/>');
  391. </xsl:otherwise>
  392. </xsl:choose>
  393. updateFilters();
  394. }
  395. function someDropActionOccured(){
  396. // set agent state
  397. cf.agentHasChanged(true);
  398. }
  399. /*
  400. * this is a callback function that is called when an undo/redo has been
  401. * performed
  402. * see undoRedo.js --> setFormObjectValue()
  403. */
  404. function postEditAction() {
  405. //the condition has changed so update the filters
  406. updateFilters();
  407. }
  408. function updateFilters() {
  409. var detailFilter = droppy.getDropZoneValue('<xsl:value-of select="/root/tabset/pane[1]/content/@id"/>');
  410. var summaryFilter = droppy.getDropZoneValue('<xsl:value-of select="/root/tabset/pane[2]/content/@id"/>');
  411. var filters = cf.buildFilterExpressions(detailFilter,summaryFilter);
  412. cf.cfgSet("AgentTask-condition", filters);
  413. document.getElementById('AgentTask-condition').value= filters;
  414. }
  415. function validateSpec()
  416. {
  417. var cmd = cf.createValidateCommandStackObject('filterExpression', 'errorCondition');
  418. cf.getCommandStackManager().initiateCommandStack("checkCAF()","getReportSpec()","commandStackHideDialogFrame()", "doWait('validate')", "getSaveValidateMessages()", "displayValidateMessages()", cmd);
  419. }
  420. /**
  421. *This function will display a report based on the type.
  422. * type:all - retrieve all records, limited - a subset, rows - the total number of records returned
  423. */
  424. function preview(type) {
  425. //check the type
  426. if (type) {
  427. switch (type) {
  428. case 'all' : {cf.run();} break;
  429. <!--case 'limited' : {/**todo*/} -->
  430. case 'rows' : {cf.runCount();} break;
  431. default : {/**limited is the default*/}
  432. }
  433. }
  434. }
  435. </script>
  436. </utml:form>
  437. </xts:transform>
  438. </markup>
  439. <browserTitle>
  440. <xsl:value-of select="key('business-rules','browserTitle')"/>
  441. </browserTitle>
  442. </xsl:element>
  443. </xos:entityBody>
  444. </xos:part>
  445. </xts:append>
  446. </xts:sequence>
  447. </xsl:template>
  448. <!-- pull in other templates that are needed -->
  449. <agscnd:buildInfoTab/>
  450. <agscnd:buildInfoSection/>
  451. <ags:buildConditionTab/>
  452. <ags:buildButtons/>
  453. <agscnd:expressionBaseUI/>
  454. <agscnd:script/>
  455. </xsl:stylesheet>
  456. </xts:block>
  457. <!--
  458. ===============================================================================================
  459. debug - special debug block for nested requests
  460. ===============================================================================================
  461. -->
  462. <xts:block id="debug" type="exec" processor="XSLT" mimeType="text/html" dependency="genMarkup returnResult" condition=".[/root/session/param[@name='debug']='1']" mandatory="false">
  463. <!-- Get the debug logic sheet -->
  464. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  465. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
  466. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  467. <xsl:template match="/">
  468. <dbg:dumpxml select="/root"/>
  469. </xsl:template>
  470. </xsl:stylesheet>
  471. </xts:block>
  472. </xts:morphlet>