test_connection.xts 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2015
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseDataSourcesTool">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init - standard form logic initialization
  16. ===============================================================================================
  17. -->
  18. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  19. <!--
  20. ================================================================================
  21. encrypt the password
  22. ================================================================================
  23. -->
  24. <xts:block id="encrypt_password" path="/portal/encryptConnectionPasswords.xslt" dependency="formlogic_init" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='m_cube_password' or @name='test_cube_password' or @name='m_connection_password' or @name='m_connection_proxy_password' or @name='proxyPasswordEncrypted' or @name='test_password'] != '']" nodelist="env"/>
  25. <!--
  26. ===============================================================================================
  27. getContent
  28. ===============================================================================================
  29. -->
  30. <xts:block id="getContent" dependency="formlogic_init" processor="XSLT" type="exec" nodelist="env,session,system,header">
  31. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  32. <xsl:stylesheet version="1.0"
  33. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  34. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  35. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  36. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  37. exclude-result-prefixes="xsl send xtsext cm">
  38. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  39. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  40. <xsl:variable name="connectionObject" select="key('env-param','m_obj')"/>
  41. <xsl:variable name="fromWizard" select="key('env-param','m_new_class') and key('env-param','m_new_class')!=''"/>
  42. <xsl:template match="/">
  43. <xts:sequence>
  44. <xts:append>
  45. <content>
  46. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  47. <send:request provider="cm">
  48. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  49. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  50. <cm:requests>
  51. <cm:query>
  52. <cm:search><xsl:value-of select="$connectionObject"/>/dataSourceSignon[permission('read') and permission('execute')]</cm:search>
  53. <cm:properties>
  54. <cm:property name="searchPath"/>
  55. <cm:property name="defaultName"/>
  56. <cm:property name="credentials"/>
  57. </cm:properties>
  58. </cm:query>
  59. <cm:query>
  60. <cm:search>/configuration//*[@objectClass='metadataService' or @objectClass='queryService']/parent::*</cm:search>
  61. <cm:properties>
  62. <cm:property name="defaultName"/>
  63. <cm:property name="ancestors"/>
  64. <cm:property name="searchPath"/>
  65. <cm:property name="dispatcherID"/>
  66. <cm:property name="iconURI"/>
  67. <cm:property name="runningState"/>
  68. </cm:properties>
  69. <cm:sortBy>
  70. <cm:sort name="defaultName" order="ascending"/>
  71. </cm:sortBy>
  72. </cm:query>
  73. <xsl:if test="not($fromWizard)">
  74. <!-- query required information from the connection object -->
  75. <cm:query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  76. <cm:search><xsl:value-of select="$connectionObject"/></cm:search>
  77. <cm:properties>
  78. <cm:property name="connectionString"/>
  79. <cm:property name="credentialNamespaces"/>
  80. </cm:properties>
  81. </cm:query>
  82. </xsl:if>
  83. <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  84. <search><xsl:value-of select="$connectionObject"/>/credential[@name='proxy']</search>
  85. <properties>
  86. <cm:property name="defaultName"/>
  87. <cm:property name="objectClass"/>
  88. <cm:property name="dataSourceConnectionName"/>
  89. <cm:property name="credentials"/>
  90. </properties>
  91. </query>
  92. </cm:requests>
  93. </cm:query>
  94. </xts:transform>
  95. </send:request>
  96. </xts:transform>
  97. </content>
  98. <namespaces>
  99. <xts:transform src="transforms/portal/dataSource/stripnamespace.xslt" processor="XSLT">
  100. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  101. <send:request provider="cm">
  102. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  103. <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  104. <search>/directory/namespace<xsl:value-of select="/root/system/param[@name='namespace_filter']"/></search>
  105. <properties>
  106. <cm:property name="defaultName"/>
  107. <cm:property name="searchPath"/>
  108. <cm:property name="active"/>
  109. </properties>
  110. </query>
  111. </xts:transform>
  112. </send:request>
  113. </xts:transform>
  114. </xts:transform>
  115. </namespaces>
  116. </xts:append>
  117. <xsl:variable name="firstVisitToPage" select="not(key('env-param','m_p_connectionString')) and not($fromWizard)"/>
  118. <xsl:if test="$firstVisitToPage">
  119. <xts:append select="/root/env">
  120. <param name="m_p_connectionString">
  121. <xts:transform name="XMLEncode"><xts:queryValue select="/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply'][3]/*[local-name()='dataSourceConnection']/*[local-name()='connectionString']"/></xts:transform>
  122. </param>
  123. <param name="m_p_credentialNamespaces">
  124. <xts:transform name="XMLEncode"><xts:queryValue select="/root/content/*[local-name()='queryResponse']/*[local-name()='queryReply'][3]/*[local-name()='dataSourceConnection']/*[local-name()='credentialNamespaces']/*/*[local-name()='searchPath']"/></xts:transform>
  125. </param>
  126. </xts:append>
  127. </xsl:if>
  128. <xts:delete select="/root/env/param[contains(' pagerfrom pagerto pagerfrom_d pagerto_d ', concat(' ',@name,' '))]"/>
  129. </xts:sequence>
  130. </xsl:template>
  131. </xsl:stylesheet>
  132. </xts:block>
  133. <!--
  134. ====================================================================================================================
  135. generateProxyInformation - generate proxy host credentials if they do not exists (coming from new connection wizard)
  136. ====================================================================================================================
  137. -->
  138. <xts:block id="generateProxyInformation" mode="interpret" type="exec" processor="XSLT" dependency="getContent" nodelist="env, content" mandatory="false" condition=".[(contains(/root/env/param[@name='m_p_connectionString'], 'ERP-SFDC'))]">
  139. <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
  140. <xsl:stylesheet version="1.0"
  141. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  142. xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/">
  143. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  144. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  145. <xsl:template match="/">
  146. <xts:sequence>
  147. <dcx:savePasswordVars/>
  148. <xsl:if test="(not(key('env-param','m_proxy_credentials') or key('env-param','m_proxy_credentials'='')) and not(/root/content/cm:queryResponse/cm:queryReply/cm:credential/cm:credentials))">
  149. <xts:delete select="/root/env/param[@name='m_proxy_credentials']"/>
  150. <xts:append select="/root/env">
  151. <param name="m_proxy_credentials">
  152. <xsl:text>&lt;credential&gt;&lt;encryptedValue&gt;</xsl:text>
  153. <xsl:call-template name="dcx:genCredentials">
  154. <xsl:with-param name="username" select="key('env-param', 'm_connection_proxy_user')"/>
  155. <xsl:with-param name="password" select="key('env-param', 'proxyPasswordEncrypted')"/>
  156. <xsl:with-param name="passwordEncrypted" select="true()"/>
  157. <xsl:with-param name="cubePassword" select="$cubePassword"/>
  158. <xsl:with-param name="cubePasswordEncrypted" select="$cubePasswordEncrypted"/>
  159. </xsl:call-template>
  160. <xsl:text>&lt;/encryptedValue&gt;&lt;/credential&gt;</xsl:text>
  161. </param>
  162. </xts:append>
  163. </xsl:if>
  164. </xts:sequence>
  165. </xsl:template>
  166. <dcx:genCredentialTemplate/>
  167. </xsl:stylesheet>
  168. </xts:block>
  169. <!--
  170. ===========================================================================================================
  171. appendProxyInformation - append proxy host information to connectionnString for salesforce.com datasources
  172. ===========================================================================================================
  173. -->
  174. <xts:block id="appendProxyInformation" mode="interpret" type="exec" processor="XSLT" dependency="getContent generateProxyInformation" nodelist="env, content" mandatory="false" condition=".[(contains(/root/env/param[@name='m_p_connectionString'], 'ERP-SFDC'))]">
  175. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  176. <xsl:stylesheet version="1.0"
  177. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  178. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
  179. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  180. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  181. <xsl:template match="/">
  182. <xts:sequence>
  183. <xsl:variable name="proxyCredentials">
  184. <xsl:choose>
  185. <xsl:when test="key('env-param','m_proxy_credentials')!=''">
  186. <xsl:value-of select="key('env-param','m_proxy_credentials')"/>
  187. </xsl:when>
  188. <xsl:otherwise>
  189. <xsl:value-of select="/root/content/cm:queryResponse/cm:queryReply/cm:credential/cm:credentials"/>
  190. </xsl:otherwise>
  191. </xsl:choose>
  192. </xsl:variable>
  193. <!-- check if env-param of m_p_connectionString already contains <credential><encryptedValue> -->
  194. <xsl:variable name="proxyEnabled" select="contains(key('env-param','m_p_connectionString'), 'PROXY_ENABLED=true')"/>
  195. <xsl:variable name="proxyAlreadyAppended" select="contains(/root/env/param[@name='m_p_connectionString'],'&lt;credential&gt;&lt;encryptedValue&gt;')"/>
  196. <xsl:if test="$proxyEnabled and not($proxyAlreadyAppended)">
  197. <xts:replace select="/root/env/param[@name='m_p_connectionString']">
  198. <param name="m_p_connectionString">
  199. <xsl:value-of select="key('env-param','m_p_connectionString')"/>;PROXYCREDENTIAL=<xsl:value-of select="$proxyCredentials"/>
  200. </param>
  201. </xts:replace>
  202. </xsl:if>
  203. </xts:sequence>
  204. </xsl:template>
  205. </xsl:stylesheet>
  206. </xts:block>
  207. <!--
  208. ===============================================================================================
  209. trimAncestors - remove /configuration from the ancestors element
  210. ===============================================================================================
  211. -->
  212. <xts:block id="trimAncestors" dependency="getContent" type="exec" mode="interpret" processor="XSLT" nodelist="">
  213. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  214. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  215. <xsl:template match="/">
  216. <xts:sequence>
  217. <xts:delete select="/root/content/*[local-name() = 'queryResponse']/*[local-name() = 'queryReply'][2]/*[local-name() = 'dispatcher']/*[local-name() = 'ancestors']/*[local-name() = 'ancestorInfo'][1]"/>
  218. </xts:sequence>
  219. </xsl:template>
  220. </xsl:stylesheet>
  221. </xts:block>
  222. <!--
  223. ===============================================================================================
  224. classNames - get object class names
  225. ===============================================================================================
  226. -->
  227. <xts:block id="classNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  228. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  229. </xts:block>
  230. <!--
  231. ===============================================================================================
  232. renderPage - render the page
  233. ===============================================================================================
  234. -->
  235. <xts:block id="render_page" dependency="encrypt_password trimAncestors appendProxyInformation getContent classNames" mode="output" processor="XSLT" type="exec" mimeType="text/html">
  236. <xts:logicsheet path="logicsheets/portal.xsl"/>
  237. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  238. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  239. <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
  240. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  241. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  242. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  243. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  244. <xts:logicsheet path="logicsheets/validation.xslt"/>
  245. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  246. <xsl:stylesheet version="1.0"
  247. xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
  248. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  249. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  250. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  251. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  252. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  253. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  254. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  255. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  256. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  257. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  258. exclude-result-prefixes="xsl cm pf xtsext lyt dp df cf cp utml">
  259. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  260. <xsl:variable name="mname" select="'test_connection.xts'"/>
  261. <pf:variables/>
  262. <pf:gen-icon/>
  263. <xsl:variable name="title">
  264. <xsl:choose>
  265. <xsl:when test="key('env-param','m_new_class')!=''">
  266. <xsl:choose>
  267. <xsl:when test="key('env-param','m_new_class')='dataSource'">
  268. <xts:string id="IDS_NEW_DATA_SOURCE_TITLE"/>
  269. </xsl:when>
  270. <xsl:otherwise>
  271. <xts:string id="IDS_NEW_CONNECTION_TITLE"/>
  272. </xsl:otherwise>
  273. </xsl:choose>
  274. </xsl:when>
  275. <xsl:otherwise>
  276. <xsl:value-of select="key('env-param','m_name')"/>
  277. </xsl:otherwise>
  278. </xsl:choose>
  279. </xsl:variable>
  280. <xsl:variable name="browserTitle">
  281. <xsl:text/>
  282. <xts:string id="IDS_TEST_TITLE">
  283. <xts:param name="title"><xsl:value-of select="$title"/></xts:param>
  284. </xts:string><xsl:text/>
  285. </xsl:variable>
  286. <xsl:variable name="isPowerCube" select="contains(key('env-param','m_p_connectionString'),';LOCAL;PC;')"/>
  287. <xsl:variable name="dispatchers" select="/root/content/cm:queryResponse/cm:queryReply[2]/cm:dispatcher[cm:runningState='running' or cm:runningState='']"/>
  288. <!-- global application variables -->
  289. <xsl:template match="/root">
  290. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  291. <dp:meta>
  292. <pf:meta/>
  293. <!-- Standard meta tags -->
  294. </dp:meta>
  295. <dp:script>
  296. <pf:help context="HID_DATA_SOURCES"/>
  297. <!-- Help system -->
  298. </dp:script>
  299. <script language="JavaScript" src="{$webcontent}/{$app}/js/utilities.js"/>
  300. <script language="javascript">
  301. <dcx:checkReservedChar/>
  302. function doCancel()
  303. {
  304. <xsl:choose>
  305. <xsl:when test="key('env-param','from_bmt')!=''">
  306. <!-- Called only when canceling back to BMT environment. -->
  307. window.external.OnClose(1);
  308. </xsl:when>
  309. <xsl:otherwise>
  310. <xsl:choose>
  311. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  312. document.pform.ps_nav_op.value = 'pop';
  313. <xsl:variable name="nav-stack-delimiter" select="'*'"/>
  314. <xsl:variable name="target">
  315. <xsl:choose>
  316. <xsl:when test="contains(key('env-param','ps_nav_stack'), $nav-stack-delimiter)">
  317. <xsl:value-of select="substring-before( key('env-param','ps_nav_stack'), $nav-stack-delimiter )"/>
  318. </xsl:when>
  319. <xsl:otherwise>
  320. <xsl:value-of select="key('env-param','ps_nav_stack')"/>
  321. </xsl:otherwise>
  322. </xsl:choose>
  323. </xsl:variable>
  324. document.pform.m.value = '<xsl:value-of select="xtsext:javascriptencode(string($target))"/>';
  325. document.pform.submit();
  326. </xsl:when>
  327. <xsl:otherwise>
  328. location.href = '<xsl:value-of select="xtsext:javascriptencode(string(key('env-param','backURL')))"/>';
  329. </xsl:otherwise>
  330. </xsl:choose>
  331. </xsl:otherwise>
  332. </xsl:choose>
  333. }
  334. function init()
  335. {
  336. updateTest();
  337. }
  338. function validate()
  339. {
  340. var frm = document.pform;
  341. <xsl:if test="$dispatchers/*">
  342. <!-- make sure at least one dispatcher is selected -->
  343. if (frm.dispatcher &amp;&amp; frm.dispatcher[0])
  344. {
  345. for (var i = frm.dispatcher.length-1; i >= 0; i--)
  346. {
  347. if (frm.dispatcher[i].selected == true)
  348. {
  349. return true;
  350. }
  351. }
  352. alert("<xts:string id="IDS_TEST_CONNECTION_NO_SELECTION" encode="javascript"/>");
  353. return false;
  354. }
  355. </xsl:if>
  356. <xsl:choose>
  357. <xsl:when test="$isPowerCube">
  358. if (frm.test_using &amp;&amp; frm.test_using[0].checked)
  359. {
  360. if (!checkReservedChar(frm.test_cube_password, '<xts:string id="IDS_PROP_CONN_CUBE_PASSWORD_FIELD" encode="javascript"/>'))
  361. {
  362. return false;
  363. }
  364. }
  365. </xsl:when>
  366. <xsl:otherwise>
  367. if (frm.test_using &amp;&amp; frm.test_using[0].checked)
  368. {
  369. if (!checkReservedChar(frm.m_connection_userid, '<xts:string id="IDS_USERID" encode="javascript"/>'))
  370. {
  371. return false;
  372. }
  373. if (frm.test_password &amp;&amp; !checkReservedChar(frm.test_password, '<xts:string id="IDS_PASSWORD" encode="javascript"/>'))
  374. {
  375. return false;
  376. }
  377. }
  378. </xsl:otherwise>
  379. </xsl:choose>
  380. return true;
  381. }
  382. function updateTest()
  383. {
  384. var f = document.pform;
  385. if (f.test_using)
  386. {
  387. if (f.test_using[0].checked)
  388. {
  389. <xsl:choose>
  390. <xsl:when test="$isPowerCube">
  391. if (f.test_cube_password)
  392. {
  393. f.test_cube_password.disabled = false;
  394. }
  395. </xsl:when>
  396. <xsl:otherwise>
  397. f.m_connection_userid.disabled = false;
  398. if (f.test_password)
  399. {
  400. f.test_password.disabled = false;
  401. }
  402. </xsl:otherwise>
  403. </xsl:choose>
  404. if (f.pageitem &amp;&amp; f.pageitem[0])
  405. {
  406. for (i=0; f.pageitem[i];i++)
  407. {
  408. f.pageitem[i].disabled = true;
  409. }
  410. }
  411. else if (f.pageitem)
  412. {
  413. f.pageitem.disabled = true;
  414. }
  415. }
  416. else
  417. {
  418. <xsl:choose>
  419. <xsl:when test="$isPowerCube">
  420. if (f.test_cube_password)
  421. {
  422. f.test_cube_password.disabled = true;
  423. }
  424. </xsl:when>
  425. <xsl:otherwise>
  426. f.m_connection_userid.disabled = true;
  427. if (f.test_password)
  428. {
  429. f.test_password.disabled = true;
  430. }
  431. </xsl:otherwise>
  432. </xsl:choose>
  433. if (f.pageitem &amp;&amp; f.pageitem[0])
  434. {
  435. for (i=0; f.pageitem[i];i++)
  436. {
  437. f.pageitem[i].disabled = false;
  438. }
  439. }
  440. else if (f.pageitem)
  441. {
  442. f.pageitem.disabled = false;
  443. }
  444. }
  445. }
  446. <xsl:if test="$isPowerCube">
  447. toggleUserPassword();
  448. </xsl:if>
  449. }
  450. <xsl:if test="$isPowerCube">
  451. function toggleUserPassword() {
  452. var f = document.pform;
  453. if (f.m_p_test_credentialNamespaces)
  454. {
  455. if (f.m_p_test_credentialNamespaces.options[f.m_p_test_credentialNamespaces.selectedIndex].value=='none')
  456. {
  457. if (f.m_connection_userid &amp;&amp; f.test_password)
  458. {
  459. f.m_connection_userid.disabled=true;
  460. f.m_connection_userid.value='';
  461. f.test_password.disabled=true;
  462. f.test_password.value='';
  463. }
  464. }
  465. else if (f.m_p_test_credentialNamespaces.options[f.m_p_test_credentialNamespaces.selectedIndex].value!='none')
  466. {
  467. if (f.m_connection_userid)
  468. {
  469. f.m_connection_userid.disabled=false;
  470. }
  471. if (f.test_password)
  472. {
  473. f.test_password.disabled=false;
  474. }
  475. }
  476. }
  477. }
  478. </xsl:if>
  479. function clearEncryptedPassword()
  480. {
  481. if (document.pform.passwordEncrypted)
  482. document.pform.passwordEncrypted.value = '';
  483. }
  484. function clearCubePassword()
  485. {
  486. if (document.pform.cubePasswordEncrypted)
  487. document.pform.cubePasswordEncrypted.value = '';
  488. }
  489. function selectAll()
  490. {
  491. var frm = document.pform;
  492. if (frm.dispatcher)
  493. {
  494. for (var i = frm.dispatcher.length-1; i >= 0; i--) {
  495. frm.dispatcher[i].selected = true;
  496. }
  497. }
  498. }
  499. function deselectAll()
  500. {
  501. var frm = document.pform;
  502. if (frm.dispatcher)
  503. {
  504. for (var i = frm.dispatcher.length-1; i >= 0; i--) {
  505. frm.dispatcher[i].selected = false;
  506. }
  507. }
  508. }
  509. </script>
  510. <utml:form name="pform" method="post" action="{$gateway}">
  511. <xsl:variable name="test_description">
  512. <xsl:choose>
  513. <xsl:when test="contains(key('env-param','m_p_connectionString'),';LOCAL;RP-CMIS-FILENET;')">
  514. <xts:string id="IDS_TEST_DESCRIPTION_REPOSITORY"/>
  515. </xsl:when>
  516. <xsl:otherwise>
  517. <xts:string id="IDS_TEST_DESCRIPTION"/>
  518. </xsl:otherwise>
  519. </xsl:choose>
  520. </xsl:variable>
  521. <dp:header>
  522. <!-- header titles-->
  523. <dp:title><xsl:value-of select="normalize-space($browserTitle)"/></dp:title>
  524. <dp:description><xsl:value-of select="$test_description"/></dp:description>
  525. <dp:close>
  526. <a href="javascript:doCancel()">
  527. <dp:closeMarker/>
  528. </a>
  529. </dp:close>
  530. </dp:header>
  531. <xsl:variable name="test_using">
  532. <xsl:choose>
  533. <xsl:when test="key('env-param','test_using')">
  534. <xsl:value-of select="key('env-param','test_using')"/>
  535. </xsl:when>
  536. <xsl:when test="/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon/*">signon</xsl:when>
  537. <xsl:otherwise>userid_password</xsl:otherwise>
  538. </xsl:choose>
  539. </xsl:variable>
  540. <lyt:layout style="1">
  541. <lyt:section>
  542. <table cellspacing="0" border="0" cellpadding="1" role="presentation">
  543. <tr>
  544. <td nowrap="nowrap" class="formLabel">
  545. <xts:string id="IDS_PROP_CONN_CONNECT"/>
  546. </td>
  547. </tr>
  548. <tr>
  549. <td class="formText">
  550. <xsl:value-of select="key('env-param','m_p_connectionString')"/>
  551. </td>
  552. </tr>
  553. <tr>
  554. <td nowrap="nowrap"><img height="5" width="10" src="{$webcontent}/images/space.gif"/></td>
  555. </tr>
  556. <tr>
  557. <td>
  558. <table border="0" cellpadding="1" cellspacing="0" role="presentation">
  559. <tr>
  560. <df:button df:id="IDS_PROP_CONN_TEST_BUTTON" id="btn_test_connection" utml:validate="true" df:style="stack-up">
  561. <df:target><xsl:value-of select="$app"/>/test_connection_results.xts</df:target>
  562. </df:button>
  563. </tr>
  564. </table>
  565. </td>
  566. </tr>
  567. <tr>
  568. <td nowrap="nowrap">&#160;</td>
  569. </tr>
  570. </table>
  571. <!-- Don't show the dispatcher section if the user doesn't have access to them -->
  572. <xsl:if test="$dispatchers/*">
  573. <table cellspacing="0" border="0" cellpadding="1" role="presentation">
  574. <tr>
  575. <td nowrap="nowrap" class="formLabel">
  576. <span id="lbl_dispatcher"><xts:string id="IDS_TEST_CONNECTION_DISPATCHER"/></span>
  577. </td>
  578. </tr>
  579. <xsl:choose>
  580. <!-- where there is only 1 dispatcher then don't put it in a select -->
  581. <xsl:when test="count($dispatchers) = 1">
  582. <tr>
  583. <td class="formText">
  584. <utml:input type="hidden" name="dispatcher">
  585. <utml:value>
  586. <xsl:value-of select="$dispatchers/cm:dispatcherID"/>
  587. </utml:value>
  588. </utml:input>
  589. <xsl:value-of select="$dispatchers/cm:defaultName"/>
  590. <xsl:call-template name="ancestorsString">
  591. <xsl:with-param name="path" select="$dispatchers"/>
  592. </xsl:call-template>
  593. </td>
  594. </tr>
  595. </xsl:when>
  596. <xsl:otherwise>
  597. <tr>
  598. <td>
  599. <utml:select size="4" name="dispatcher" aria-labelledby="lbl_dispatcher" multiple="true">
  600. <xsl:for-each select="$dispatchers">
  601. <xsl:sort select="cm:defaultName"/>
  602. <option value="{cm:dispatcherID}">
  603. <xsl:if test="key('env-param','dispatcher')=cm:dispatcherID">
  604. <xsl:attribute name="selected">true</xsl:attribute>
  605. </xsl:if>
  606. <xsl:value-of select="cm:defaultName"/>
  607. <xsl:call-template name="ancestorsString">
  608. <xsl:with-param name="path" select="."/>
  609. </xsl:call-template>
  610. </option>
  611. </xsl:for-each>
  612. <option value="deleteme">
  613. <xsl:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<xsl:text/>
  614. <xsl:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<xsl:text/>
  615. <xsl:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<xsl:text/>
  616. <xsl:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<xsl:text/>
  617. <xsl:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<xsl:text/>
  618. <xsl:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<xsl:text/>
  619. <xsl:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<xsl:text/>
  620. </option>
  621. </utml:select>
  622. </td>
  623. </tr>
  624. <tr>
  625. <td align="right" class="tabletext">
  626. <a href="#" onclick="javascript:selectAll();">
  627. <xts:string id="IDS_SELECT_PAGE"/>
  628. </a>
  629. <img height="1" width="10" src="{$webcontent}/images/space.gif"/>
  630. <a href="#" onclick="javascript:deselectAll();">
  631. <xts:string id="IDS_DESELECT_ALL"/>
  632. </a>
  633. </td>
  634. </tr>
  635. </xsl:otherwise>
  636. </xsl:choose>
  637. <tr>
  638. <td nowrap="nowrap">&#160;</td>
  639. </tr>
  640. </table>
  641. </xsl:if>
  642. <xsl:choose>
  643. <!-- the UI is different if we're dealing with a powercube -->
  644. <xsl:when test="$isPowerCube">
  645. <xsl:variable name="needCubePassword" select="contains(key('env-param','m_p_connectionString'),'^?Password:;')"/>
  646. <xsl:variable name="available_namespace" select="/root/*[local-name()='namespaces']/*[local-name()='queryResponse']/*[local-name()='namespace']/*[local-name()='active']='true'"/>
  647. <!-- does the user have to make choice with what to test with? -->
  648. <xsl:if test="key('env-param','m_p_credentialNamespaces')!='' or $needCubePassword='true' or $available_namespace">
  649. <dp:list>
  650. <dp:section>
  651. <dp:label for="ctrl_m_p_test_credentialNamespaces">
  652. <xts:string id="IDS_TEST_CONNECTION_USING"/>
  653. </dp:label>
  654. </dp:section>
  655. <xsl:choose>
  656. <xsl:when test="$available_namespace and string(key('env-param','m_p_credentialNamespaces'))=''">
  657. <dp:choice>
  658. <dp:section>
  659. <dp:hint>
  660. <xts:string id="IDS_PROP_CONN_POWERCUBE_NAMESPACES"/>
  661. </dp:hint>
  662. </dp:section>
  663. <dp:section>
  664. <xsl:call-template name="externalNamespace">
  665. <xsl:with-param name="form-read-only" select="'false'"/>
  666. <xsl:with-param name="utml-form-name" select="'pform'"/>
  667. </xsl:call-template>
  668. </dp:section>
  669. <dp:section>
  670. <xsl:call-template name="userIDPassword"/>
  671. </dp:section>
  672. </dp:choice>
  673. </xsl:when>
  674. <xsl:when test="key('env-param','m_p_credentialNamespaces')!=''">
  675. <!-- userID and Password used to authenticate against a namespace -->
  676. <dp:section>
  677. <xsl:call-template name="userIDPassword"/>
  678. </dp:section>
  679. </xsl:when>
  680. </xsl:choose>
  681. <!-- Cube password -->
  682. <xsl:if test="$needCubePassword='true'">
  683. <xsl:choose>
  684. <!-- if we're in a wizard, then don't show the signons -->
  685. <xsl:when test="key('env-param','m_new_class')!=''">
  686. <dp:section>
  687. <dp:label for="ctrl_test_cube_password">
  688. <xts:string id="IDS_PROP_CONN_CUBE_PASSWORD_FIELD"/>
  689. </dp:label>
  690. </dp:section>
  691. <dp:section>
  692. <utml:input type="password" name="test_cube_password" size="53" utml:update="false" onchange="clearCubePassword()" id="ctrl_test_cube_password">
  693. <xsl:attribute name="value">
  694. <xsl:choose>
  695. <xsl:when test="key('env-param','cubePasswordEncrypted')!=''">********</xsl:when>
  696. <xsl:otherwise></xsl:otherwise>
  697. </xsl:choose>
  698. </xsl:attribute>
  699. </utml:input>
  700. </dp:section>
  701. </xsl:when>
  702. <xsl:otherwise>
  703. <dp:section>
  704. <dp:hint>
  705. <xts:string id="IDS_TEST_CONNECTION_USING_CUBE_PASS"/>
  706. </dp:hint>
  707. </dp:section>
  708. <dp:section>
  709. <dp:choice>
  710. <utml:radio-group name="test_using">
  711. <utml:default-value>
  712. <xsl:value-of select="$test_using"/>
  713. </utml:default-value>
  714. <dp:section1>
  715. <utml:input type="radio" name="test_using" value="userid_password" onclick="updateTest();" aria-labelledby="ctrl_test_using_userid_password"/>
  716. </dp:section1>
  717. <dp:section2 id="ctrl_test_using_userid_password">
  718. <xts:string id="IDS_PROP_CONN_CUBE_PASSWORD"/>
  719. </dp:section2>
  720. <dp:section3>
  721. <utml:input type="password" name="test_cube_password" size="53" utml:update="false" onchange="clearCubePassword()" aria-labelledby="ctrl_test_using_userid_password">
  722. <xsl:attribute name="value">
  723. <xsl:choose>
  724. <xsl:when test="key('env-param','cubePasswordEncrypted')!=''">********</xsl:when>
  725. <xsl:otherwise></xsl:otherwise>
  726. </xsl:choose>
  727. </xsl:attribute>
  728. </utml:input>
  729. </dp:section3>
  730. <dp:section1>
  731. <utml:input type="radio" name="test_using" value="signon" onclick="updateTest();" id="ctrl_test_using_signon">
  732. <xsl:if test="not(/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon/*)">
  733. <xsl:attribute name="disabled">true</xsl:attribute>
  734. </xsl:if>
  735. </utml:input>
  736. </dp:section1>
  737. <dp:section2 for="ctrl_test_using_signon">
  738. <xts:string id="IDS_TEST_CONNECTION_USING_SIGNON"/>
  739. </dp:section2>
  740. </utml:radio-group>
  741. <dp:section3>
  742. <xsl:call-template name="genSignonList">
  743. <xsl:with-param name="test_using" select="$test_using"/>
  744. </xsl:call-template>
  745. </dp:section3>
  746. </dp:choice>
  747. </dp:section>
  748. </xsl:otherwise>
  749. </xsl:choose>
  750. </xsl:if>
  751. </dp:list>
  752. </xsl:if>
  753. </xsl:when>
  754. <xsl:otherwise>
  755. <xsl:variable name="needPassword" select="contains(key('env-param','m_p_connectionString'),'^?Password:;') or contains(key('env-param','m_p_connectionString'),';PWD=%s')"/>
  756. <xsl:variable name="needUserID" select="contains(key('env-param','m_p_connectionString'),'^User ID:') or contains(key('env-param','m_p_connectionString'),';UID=%s')"/>
  757. <!-- don't show the username/password section if the connection doesn't need a username -->
  758. <!-- don't show the signons of the radio buttons if we're in the wizard -->
  759. <xsl:if test="$needUserID='true'">
  760. <xsl:choose>
  761. <xsl:when test="key('env-param','m_new_class')!=''">
  762. <dp:input>
  763. <dp:section1><xts:string id="IDS_TEST_CONNECTION_USING"/></dp:section1>
  764. <dp:section2>
  765. <xsl:call-template name="userIDPassword">
  766. <xsl:with-param name="needPassword" select="$needPassword='true'"/>
  767. </xsl:call-template>
  768. </dp:section2>
  769. </dp:input>
  770. </xsl:when>
  771. <xsl:otherwise>
  772. <dp:list>
  773. <dp:section>
  774. <dp:label>
  775. <xts:string id="IDS_TEST_CONNECTION_USING"/>
  776. </dp:label>
  777. </dp:section>
  778. <dp:section>
  779. <dp:hint>
  780. <xsl:choose>
  781. <xsl:when test="$needPassword='true'">
  782. <xts:string id="IDS_TEST_CONNECTION_USING_USER_PASS"/>
  783. </xsl:when>
  784. <xsl:otherwise>
  785. <xts:string id="IDS_TEST_CONNECTION_USING_USER"/>
  786. </xsl:otherwise>
  787. </xsl:choose>
  788. </dp:hint>
  789. </dp:section>
  790. <dp:section>
  791. <dp:choice>
  792. <utml:radio-group name="test_using">
  793. <utml:default-value>
  794. <xsl:value-of select="$test_using"/>
  795. </utml:default-value>
  796. <dp:section1>
  797. <utml:input type="radio" name="test_using" value="userid_password" onclick="updateTest();" id="ctrl_test_using_userid_password"/>
  798. </dp:section1>
  799. <dp:section2 for="ctrl_test_using_userid_password">
  800. <xsl:choose>
  801. <xsl:when test="$needPassword='true'">
  802. <xts:string id="IDS_TEST_CONNECTION_USING_USERID"/>
  803. </xsl:when>
  804. <xsl:otherwise>
  805. <xts:string id="IDS_TEST_CONNECTION_USING_USER_ONLY"/>
  806. </xsl:otherwise>
  807. </xsl:choose>
  808. </dp:section2>
  809. <dp:section3>
  810. <dp:input>
  811. <dp:section1 id="lbl_m_connection_userid">
  812. <xts:string id="IDS_SELECT_CONNECT_USERID"/>
  813. </dp:section1>
  814. <dp:section2>
  815. <utml:input type="text" name="m_connection_userid" size="53" aria-labelledby="lbl_m_connection_userid">
  816. <xsl:if test="$test_using='signon'">
  817. <xsl:attribute name="disabled">true</xsl:attribute>
  818. </xsl:if>
  819. </utml:input>
  820. </dp:section2>
  821. </dp:input>
  822. <xsl:if test="$needPassword='true'">
  823. <dp:input>
  824. <dp:section1 id="lbl_test_password">
  825. <xts:string id="IDS_SELECT_CONNECT_PASSWORD"/>
  826. </dp:section1>
  827. <dp:section2>
  828. <utml:input type="password" name="test_password" size="53" utml:update="false" onchange="clearEncryptedPassword()" aria-labelledby="lbl_test_password">
  829. <xsl:if test="$test_using='signon'">
  830. <xsl:attribute name="disabled">true</xsl:attribute>
  831. </xsl:if>
  832. <xsl:attribute name="value">
  833. <xsl:choose>
  834. <xsl:when test="key('env-param','passwordEncrypted')!=''">********</xsl:when>
  835. <xsl:otherwise></xsl:otherwise>
  836. </xsl:choose>
  837. </xsl:attribute>
  838. </utml:input>
  839. </dp:section2>
  840. </dp:input>
  841. </xsl:if>
  842. </dp:section3>
  843. <dp:section1>
  844. <utml:input type="radio" name="test_using" value="signon" onclick="updateTest();" id="ctrl_test_using_signon">
  845. <xsl:if test="not(/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon/*)">
  846. <xsl:attribute name="disabled">true</xsl:attribute>
  847. </xsl:if>
  848. </utml:input>
  849. </dp:section1>
  850. <dp:section2 for="ctrl_test_using_signon">
  851. <xts:string id="IDS_TEST_CONNECTION_USING_SIGNON"/>
  852. </dp:section2>
  853. </utml:radio-group>
  854. <dp:section3>
  855. <xsl:call-template name="genSignonList">
  856. <xsl:with-param name="test_using" select="$test_using"/>
  857. </xsl:call-template>
  858. </dp:section3>
  859. </dp:choice>
  860. </dp:section>
  861. </dp:list>
  862. </xsl:otherwise>
  863. </xsl:choose>
  864. </xsl:if>
  865. </xsl:otherwise>
  866. </xsl:choose>
  867. </lyt:section>
  868. </lyt:layout>
  869. <!-- =================== F o o t e r ===================== -->
  870. <dp:footer>
  871. <xsl:choose>
  872. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  873. <df:button df:id="IDS_CLOSE" df:style="stack-down"/>
  874. </xsl:when>
  875. <xsl:otherwise>
  876. <df:button df:id="IDS_CLOSE" df:style="back-url"/>
  877. </xsl:otherwise>
  878. </xsl:choose>
  879. </dp:footer>
  880. <!-- delete the blank option from the dispatcher list and select the first dispatcher -->
  881. <script language="javascript">
  882. <xsl:if test="count($dispatchers) > 1">
  883. //delete the blank options
  884. if (document.pform.dispatcher[(document.pform.dispatcher.length - 1)].value == 'deleteme') {
  885. document.pform.dispatcher[(document.pform.dispatcher.length - 1)] = null;
  886. }
  887. </xsl:if>
  888. <xsl:if test="not(key('env-param','dispatcher'))">
  889. if (document.pform.dispatcher &amp;&amp; document.pform.dispatcher[0])
  890. {
  891. document.pform.dispatcher[0].selected = true;
  892. }
  893. </xsl:if>
  894. </script>
  895. </utml:form>
  896. </dp:page>
  897. </xsl:template>
  898. <xsl:template match="*[local-name()='message']">
  899. <xsl:value-of select="xtsext:javascriptencode(string(.))"/><xsl:if test="string-length(normalize-space(.)) > 0">\n</xsl:if>
  900. </xsl:template>
  901. <xsl:template name="ancestorsString">
  902. <xsl:param name="path"/>
  903. <xsl:variable name="ancestors">
  904. <xsl:if test="$path/cm:ancestors/*">
  905. <cf:do-the-path-link>
  906. <cf:param name="familytree">$path/cm:ancestors</cf:param>
  907. <cf:param name="familymember">$path/cm:defaultName</cf:param>
  908. <cf:param name="onlyAncestors">true</cf:param>
  909. </cf:do-the-path-link>
  910. </xsl:if>
  911. </xsl:variable>
  912. <xsl:if test="$path/cm:ancestors/*">
  913. <xsl:text> (</xsl:text>
  914. <xsl:choose>
  915. <xsl:when test="(string-length($ancestors) + string-length($path/cm:defaultName)) > 100">
  916. <xsl:value-of select="$path/cm:ancestors/cm:ancestorInfo[1]/cm:title"/>
  917. <xsl:text> &gt; ... &gt; </xsl:text>
  918. <xsl:value-of select="$path/cm:ancestors/cm:ancestorInfo[position() = last()]/cm:title"/>
  919. </xsl:when>
  920. <xsl:otherwise>
  921. <xsl:value-of select="$ancestors"/>
  922. </xsl:otherwise>
  923. </xsl:choose>
  924. <xsl:text>)</xsl:text>
  925. </xsl:if>
  926. </xsl:template>
  927. <xsl:template name="userIDPassword">
  928. <xsl:param name="needPassword" select="true()"/>
  929. <xsl:param name="form-read-only" select="false()"/>
  930. <dp:input>
  931. <dp:section1 id="lbl_m_connection_userid">
  932. <xts:string id="IDS_SELECT_CONNECT_USERID"/>
  933. </dp:section1>
  934. <dp:section2>
  935. <utml:input type="text" name="m_connection_userid" size="53" aria-labelledby="lbl_m_connection_userid"/>
  936. </dp:section2>
  937. </dp:input>
  938. <xsl:if test="$needPassword='true'">
  939. <dp:input>
  940. <dp:section1 id="lbl_test_password">
  941. <xts:string id="IDS_SELECT_CONNECT_PASSWORD"/>
  942. </dp:section1>
  943. <dp:section2>
  944. <utml:input type="password" name="test_password" size="53" utml:update="false" onchange="clearEncryptedPassword()" aria-labelledby="lbl_test_password">
  945. <xsl:attribute name="value">
  946. <xsl:choose>
  947. <xsl:when test="key('env-param','passwordEncrypted')!=''">********</xsl:when>
  948. <xsl:otherwise></xsl:otherwise>
  949. </xsl:choose>
  950. </xsl:attribute>
  951. </utml:input>
  952. </dp:section2>
  953. </dp:input>
  954. </xsl:if>
  955. </xsl:template>
  956. <xsl:template name="genSignonList">
  957. <xsl:param name="test_using"/>
  958. <xsl:param name="form-read-only" select="false()"/>
  959. <utml:radio-group name="pageitem">
  960. <utml:default-value>
  961. <xsl:value-of select="/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon[1]/cm:searchPath"/>
  962. </utml:default-value>
  963. <cf:main-pager-section form="pform" width="500">
  964. <cf:param name="item-path">/root/content/cm:queryResponse/cm:queryReply[1]/cm:dataSourceSignon</cf:param>
  965. <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
  966. <cf:param name="lines-per-page">
  967. <xsl:value-of select="key('session-param', 'linesPerPage')"/>
  968. </cf:param>
  969. <cf:param name="pagerSummary"><xts:string id="IDS_TEST_CONNECTION_SIGNON_SUMMARY"/></cf:param>
  970. <cf:param name="rows">
  971. <cp:tableHeader>
  972. <cp:columnHeader width="16"/>
  973. <cp:columnHeader width="20"/>
  974. <cp:columnHeader width="100%"><xts:string id="IDS_NAME"/></cp:columnHeader>
  975. </cp:tableHeader>
  976. <cp:tableContent>
  977. <cp:columnContent>
  978. <utml:input type="radio" name="pageitem">
  979. <xsl:if test="$test_using='userid_password'">
  980. <xsl:attribute name="disabled">true</xsl:attribute>
  981. </xsl:if>
  982. <xsl:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM"><xts:param name="pagerItemName"><xsl:value-of select="cm:defaultName"/></xts:param></xts:string></xsl:attribute>
  983. <utml:value>
  984. <xsl:value-of select="cm:searchPath"/>
  985. </utml:value>
  986. </utml:input>
  987. </cp:columnContent>
  988. <cp:columnContent>
  989. <xsl:call-template name="gen-icon"/>
  990. </cp:columnContent>
  991. <cp:columnContent>
  992. <xsl:value-of select="cm:defaultName"/>
  993. </cp:columnContent>
  994. </cp:tableContent>
  995. </cf:param>
  996. </cf:main-pager-section>
  997. </utml:radio-group>
  998. </xsl:template>
  999. <!--
  1000. Template that generates the namespace dropdown list
  1001. -->
  1002. <xsl:template name="externalNamespace">
  1003. <xsl:param name="form-read-only"/>
  1004. <xsl:param name="utml-form-name"/>
  1005. <utml:select name="m_p_test_credentialNamespaces" utml:track="true" onchange="javascript:toggleUserPassword()" id="ctrl_m_p_test_credentialNamespaces">
  1006. <utml:option>
  1007. <utml:value>
  1008. <xsl:value-of select="'none'"/>
  1009. </utml:value>
  1010. <xts:string id="IDS_SELECT_CONNECT_NO_AUTHENTICATION"/>
  1011. </utml:option>
  1012. <xsl:for-each select="/root/*[local-name()='namespaces']/*[local-name()='queryResponse']/*[local-name()='namespace']">
  1013. <xsl:if test="cm:active='true'">
  1014. <xsl:variable name="aNamespace">
  1015. <xsl:text/>
  1016. <xts:string id="IDS_DIRECTORY_NAMESPACE_ACTIVE">
  1017. <xts:param name="namespaceDefaultName"><xsl:value-of select="cm:defaultName"/></xts:param>
  1018. </xts:string>
  1019. <xsl:text/>
  1020. </xsl:variable>
  1021. <utml:option>
  1022. <utml:value>
  1023. <xsl:value-of select="cm:searchPath"/>
  1024. </utml:value>
  1025. <xsl:value-of select="$aNamespace"/>
  1026. </utml:option>
  1027. </xsl:if>
  1028. </xsl:for-each>
  1029. </utml:select>
  1030. </xsl:template>
  1031. </xsl:stylesheet>
  1032. </xts:block>
  1033. <!--
  1034. ===============================================================================================
  1035. debug - display debug information
  1036. ===============================================================================================
  1037. -->
  1038. <xts:block id="debug" dependency="render_page" condition=".[ /root/session/param[@name='debug'] = '1' ]" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  1039. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  1040. <!-- debug logic sheet -->
  1041. <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">
  1042. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  1043. <xsl:template match="/">
  1044. <dbg:dumpxml select="/root"/>
  1045. </xsl:template>
  1046. </xsl:stylesheet>
  1047. </xts:block>
  1048. </xts:morphlet>