123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <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">
- <!--
- ===============================================================================================
- whip out the parameters that were saved off previously
- ===============================================================================================
- -->
- <xts:block id="decodeExistingParameters" path="/ags/parameters/decodeExistingParameters.xslt" processor="XSLT" type="exec" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished' ]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ================================================================================
-
- We also may have just come back from a jauort server, so update this info with any new parameter values
- ===============================================================================================
- -->
- <xts:block id="mergeLiteralParameters" path="/ags/parameters/mergeLiteralParameters.xslt" dependency="decodeExistingParameters" processor="XSLT" type="exec" mandatory="false" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished'] ">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ================================================================================
- decode the the model item parameters from the form fields and update the parameters block
- ===============================================================================================
- -->
- <xts:block id="mergeModelParameters" path="/ags/parameters/mergeModelParameters.xslt" processor="XSLT" type="exec" mode="interpret" dependency="mergeLiteralParameters" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished'] " mandatory="false"/>
- <!--
- ================================================================================
- if We have just come back from a jaunt round the report server, update the agent task blob
- ===============================================================================================
- -->
- <xts:block id="createParametersBlob" path="/ags/parameters/createParametersBlob.xslt" dependency="mergeModelParameters" processor="XSLT" type="exec" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished'] " mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- returnResult - We're done with the email options morphlet, so return the appropriate response
- ===============================================================================================
- -->
- <xts:block id="returnResult" path="/ags/tabResultTemplate.xslt" dependency="createParametersBlob" type="exec" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished']" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Get the package content and the model details from CM
- ===============================================================================================
- -->
- <xts:block id="getDetails" processor="XSLT" type="exec" dependency="returnResult" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xsl:variable name="selectedpack">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='sql_package']">
- <xsl:value-of select="/root/env/param[@name='sql_package']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='packRoot']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="modelBase">
- <xsl:value-of select="$selectedpack"/>/model[last()]
- </xsl:variable>
- <xsl:if test="$selectedpack != ''">
- <xts:sequence>
- <xts:delete select="/root/procedureDetails" mandatory="false"/>
- <xts:append>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" responseEnvelope="true" outputHeader="true" option="xml-multipart" requester="AGS:addSql">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT" faultBlock="faultHandler">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <!-- Package content -->
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>//package</cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- </cm:query>
- <!-- Model from CM -->
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="$modelBase"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- <xsl:if test="not(/root/env/param[@name='sql_package'])">
- <xts:append select="/root/env">
- <param name="sql_package"><xsl:value-of select="/root/env/param[@name='packRoot']"/></param>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- check whether the model reference we have is the latest.... if not, then warn the user that we have updated
- <xsl:when test="/root/env/param[@name='sql_model'][. != '']">
- <xsl:value-of select="/root/env/param[@name='sql_model']"/>
- </xsl:when>
- -->
- <xts:block id="checkForModelUpdate" processor="XSLT" type="exec" dependency="getDetails" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' and /root/env/param[@name='sql_package'] != '']" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xsl:variable name="latestModel" select="/root/*[local-name()='queryResponse']/cm:queryReply/*[local-name()='model']/*[local-name()='searchPath']"/>
- <xsl:variable name="currentModel" select="/root/env/param[@name='sql_model']"/>
-
- <xts:sequence>
- <xsl:if test="not($latestModel = $currentModel) and $currentModel != ''">
- <xts:append>
- <updatedModel/>
- </xts:append>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='sql_model']">
- <xts:replace select="/root/env/param[@name='sql_model']">
- <param name="sql_model"><xsl:value-of select="$latestModel"/></param>
- </xts:replace>
- </xsl:when>
- <xsl:otherwise>
- <xts:append select="/root/env">
- <param name="sql_model"><xsl:value-of select="$latestModel"/></param>
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ================================================================================
- encode the agent items again
- ================================================================================
- -->
- <xts:block id="buildContext" dependency="checkForModelUpdate" processor="XSLT" type="exec" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState' and /root/env/param[@name='sql_package'] != ''] = 'markup']" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl pf cm xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set">
- <xsl:call-template name="buildContext"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xts:append select="/root/env">
- <param name="context">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport, '_settemplatename_buildcontext_settemplateid_dialogadapter003'), xtsext:web64encode( string( $markup ), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <!-- build the context -->
- <xsl:template name="buildContext">
- <context>
- <env>
- <!-- the actual path to the report - which is needed in the call to getParameters -->
- <xsl:copy-of select="/root/env/param[@name='sql_procedure_name']"/>
- <xsl:copy-of select="/root/env/param[@name='taskParameters']"/>
- <!-- the pv_ items - which is all the settings for parameters in the UI/drop down/input box -->
- <xsl:copy-of select="/root/env/param[starts-with(@name, 'pv_')]"/>
- </env>
- </context>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- genMarkup
- ===============================================================================================
- -->
- <xts:block id="genMarkup" type="exec" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' or /root/*[local-name()='morphletResponse']]" mandatory="false" dependency="buildContext">
- <!-- logicsheets -->
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- agent studio logicsheets -->
- <xts:logicsheet path="ags/logicsheets/arguments.xslt"/>
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <!-- Prevent the href from appearing in the status bar. -->
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:agsarg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/arguments/" xmlns:req-params="http://developer.cognos.com/schemas/request/params" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:agspmt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/promptValues/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:out="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:x="x" exclude-result-prefixes="agsarg xts xsl cm pf xtsext lyt dp df cf cp xos utml agsdlg x">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <xsl:variable name="ags_image_root">../ags/images/summary/</xsl:variable>
- <!-- These elements will insert the templates needed to generate the displayable object type and icons. -->
- <pf:gen-icon/>
- <xsl:variable name="back-url" select="key('env-param','ui.backURL')"/>
- <xsl:variable name="mname" select="'dialogAdapter.xts'"/>
- <xsl:variable name="spacer">
- <img height="10" width="10">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </xsl:variable>
- <xsl:variable name="default_package">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='sql_package']">
- <xsl:value-of select="/root/env/param[@name='sql_package']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='packRoot']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:element name="{key('request-param','resultNode')}" namespace="">
- <markup>
- <xts:transform name="XMLEncode">
- <utml:form name="pform">
- <!-- we're taking control of all the all the pv_ params ourselves -->
- <utml:exclude-prefix>pv_</utml:exclude-prefix>
- <utml:exclusion-list>
- <xsl:value-of select="' packRoot cleared_prompts m_obj method cleared_prompts pageitem context m_rp_parameters has_prompts updatedTaskParameters sql_procedure_name '"/>
- </utml:exclusion-list>
- <!-- need this to be included by default -->
- <script type="text/javascript" src="../ags/dragDropHandler.js"/>
- <utml:input type="hidden" id="taskParameters" name="taskParameters"/>
- <utml:input type="hidden" id="AgentTask-condition" name="AgentTask-condition"/>
- <utml:input type="hidden" name="taskName" utml:update="false" id="taskName">
- <input type="hidden" name="cleared_prompts" id="cleared_prompts" value="false"/>
- <utml:value>
- <xsl:choose>
- <xsl:when test="key('env-param', 'taskName') and string-length(string(key('env-param', 'taskName'))) > 0">
- <xsl:value-of select="key('env-param', 'taskName')"/>
- </xsl:when>
- <xsl:when test="key('env-param', 'SQL_x_p_report')">
- <xsl:value-of select="/root/agentList/*/cm:defaultName"/>
- </xsl:when>
- </xsl:choose>
- </utml:value>
- </utml:input>
- <agsdlg:header>
- <dp:image>
- <img alt="" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$ags_image_root"/>icon_SQL_writeback_24.gif</xsl:attribute>
- </img>
- </dp:image>
- <dp:title>
- <xts:string id="DIALOG_SQL_TITLE"/>
- </dp:title>
- <dp:description>
- <xts:string id="DIALOG_SQL_DESCRIPTION"/>
- </dp:description>
- </agsdlg:header>
- <!-- ================================================================ -->
- <!-- B O D Y -->
- <!-- ================================================================ -->
- <!-- Define a new layout-->
- <lyt:layout style="2">
- <!-- create a new row, each row includes a spacer -->
- <lyt:section>
- <dp:list width="100%">
- <dp:section>
- <dp:label>
- <xts:string id="DIALOG_SQL_PACKAGE"/>
- </dp:label>
- </dp:section>
- <dp:section>
- <xsl:choose>
- <xsl:when test="/root/cm:queryResponse/cm:queryReply/cm:package">
- <utml:select name="sql_package" style="width:80%" onchange="reloadPackage();">
- <xsl:for-each select="/root/cm:queryResponse/cm:queryReply/cm:package">
- <xsl:variable name="has_read_permission" select="contains(concat(' ', ./cm:permissions, ' '), ' read ')"/>
- <xsl:if test="$has_read_permission = 'true'">
- <utml:option>
- <xsl:if test="string(cm:searchPath) = $default_package">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <utml:value>
- <xsl:value-of select="./cm:searchPath"/>
- </utml:value>
- <xsl:variable name="path" select="./cm:searchPath"/>
- <xsl:variable name="isPersonalPath" select="starts-with($path, '~') or ( key('session-param', 'e_hp') and starts-with($path, key('session-param', 'e_hp')) )"/>
- <xsl:variable name="rootPath">
- <xsl:choose>
- <xsl:when test="$isPersonalPath">
- <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
- </xsl:when>
- <xsl:when test="starts-with($path, '/content')">
- <xsl:value-of select="$defaultContentRoot"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <cf:do-the-path-link>
- <cf:param name="familytree">./cm:ancestors</cf:param>
- <cf:param name="familymember">./cm:defaultName</cf:param>
- <cf:param name="home">
- <xsl:value-of select="$rootPath"/>
- </cf:param>
- </cf:do-the-path-link>
- </utml:option>
- </xsl:if>
- </xsl:for-each>
- </utml:select>
- <utml:input name="sql_model" id="sql_model" type="hidden" utml:update="false">
- <utml:value>
- <xsl:value-of select="/root/*[local-name()='queryResponse']/cm:queryReply/*[local-name()='model']/*[local-name()='searchPath']"/>
- </utml:value>
- </utml:input>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>
- <xts:string id="DIALOG_MESSAGE_NONE"/>
- </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </dp:section>
- </dp:list>
- </lyt:section>
- <lyt:section>
- <xsl:value-of select="key('request-param','suppressionDetails')" disable-output-escaping="yes"/>
- </lyt:section>
- </lyt:layout>
- <!--sp select drop down and asynch generated arguments list will be here -->
- <lyt:layout style="2">
- <lyt:section width="100%">
- <div id="promptValuesDiv" class="text"/>
- </lyt:section>
- </lyt:layout>
-
- <dp:emptyFooter/>
- <script language="javascript">
- var loading= false;
- function reloadPackage()
- {
- if(loading==false)
- {
- // Reset the proc name.
- var sqlProcSel = document.getElementById('sql_procedure_name');
-
- clearSelect(sqlProcSel);
- // Reset model so that it is recalculated by the xts.
- document.getElementById('sql_model').value="";
- document.getElementById('cleared_prompts').value="true";
-
- loading = true;
- parent.getConfigFrame().loadPage('ags/dialogAdapter.xts', 'maintain');
- }
- }
-
- function clearSelect(objSelect){
- if(objSelect!=null && objSelect.options){
-
- objSelect.options.length = 0;
- }
- }
-
- /*
- call the asych code to get the parameters for the stored procedure specification
- */
- function loadParameters() {
- var promptDiv = document.getElementById('promptValuesDiv');
- if (promptDiv) {
- var imgHTML = '<img src="' + '<xsl:value-of select="xtsext:javascriptencode(string($skin_root))"/>' + '/prompting/images/loading_timed.gif"/>';
- // SEC_INFO: loading_string values retrieved from AGS_language.xml messages file from the server
- promptDiv.innerHTML = imgHTML + parent.htmlEncode( parent.getConfigFrame().loading_string );
- }
- var taskId = "<xsl:value-of select="xtsext:javascriptencode(/root/req-params:requestParams/req-params:param[@name='tabSelectedID'])"/>";
- var sql_package = document.pform.sql_package.value;
- //var sql_model = document.pform.sql_model.value;
- var sp_name = '<xsl:value-of select="xtsext:javascriptencode(/root/env/param[@name='sql_procedure_name'])"/>';
- var context = "<xsl:value-of select="xtsext:javascriptencode(/root/env/param[@name='context'])"/>";
-
- <xsl:choose>
- <!-- I removed and contains(., 'read') from this condition. This is
- because if you have no read permissions you will not be able to
- select the package or see it anyway.
- -->
- <xsl:when test="not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='package'][./*[local-name()='searchPath' and . = /root/env/param[@name='sql_package']]]/*[local-name()='permissions'][contains(., 'execute')])">
- var request = parent.getConfigFrame().getGetParametersQfSpecificationRequestString(sql_package, sp_name, context, taskId);
- request += "&doSkip=true";
- parent.getConfigFrame().startGetParametersRequest(request, parent.getConfigFrame().getGetParametersQfSpecificationRequestString);
- </xsl:when>
- <xsl:otherwise>
- // do the request
- parent.getConfigFrame().startGetSpParametersRequest(sql_package, context, sp_name, taskId);
- </xsl:otherwise>
- </xsl:choose>
- }
-
- function reload()
- {
- document.getElementById('cleared_prompts').value="true";
- parent.getConfigFrame().loadPage('ags/dialogAdapter.xts', 'maintain');
- }
-
- function init() {
-
- var cf=parent.getConfigFrame?parent.getConfigFrame():null;
-
- <xsl:if test="/root/updatedModel">
- var message_string = parent.packageUpdatedMessage1_string + "\n" + parent.sqlPackageUpdatedMessage_string;
- alert(message_string);
- </xsl:if>
- var fault = "<xsl:value-of select="xtsext:javascriptencode(string(/root/soapFault/fault/*[local-name()='exception']/*[local-name()='exceptionDetail']/*[local-name()='exception']/*[local-name()='message'][1]/*[local-name()='messageString']))"/>";
- <xsl:for-each select="/root/soapFault/fault/*[local-name()='exception']/*[local-name()='exceptionDetail']/*[local-name()='exception']/*[local-name()='message']">
- cf.pageErrors[<xsl:value-of select="position()"/>-1] = "<xsl:value-of select="xtsext:javascriptencode(string(./*[local-name()='messageString']))"/>";
- </xsl:for-each>
- var selPackage = "<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='sql_package']))"/>";
- if(fault != "" ){
- parent.showErrorPage();
- }else if(selPackage.length < 1){
- alert("<xts:string id='DIALOG_SQL_PACKAGE_ERROR'/>");
- }else {
- loadParameters();
- }
- }
-
- // submit the operation and service name
- function leavingDialog(){
- if(window.argumentsLeavingDialog){
- argumentsLeavingDialog();
- }
- var list = document.getElementById("sql_procedure_name");
- if(null != list && list.selectedIndex !=-1){
- if (window.clipboardData) {
- document.getElementById("taskName").value = list.options[list.selectedIndex].text;
- }else{
- document.getElementById("taskName").value = list.options[list.selectedIndex].textContent;
- }
- }else{
- document.getElementById("taskName").value = '<xts:string id="AGS_SQL_WTASK" encode="javascript"/>' ;
- }
- }
- </script>
- <!-- build the scripts needed for prompting -->
- <agsarg:argumentsScript/>
- </utml:form>
- </xts:transform>
- </markup>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- <xts:delete select="/root/env/param[@name='sql_model']" mandatory="false"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - special debug block for nested requests
- ===============================================================================================
- -->
- <xts:block id="debug" type="exec" processor="XSLT" mimeType="text/html" dependency="genMarkup" condition=".[/root/session/param[@name='debug']='1']" mandatory="false">
- <!-- Get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <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">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="faultHandler" type="fault" processor="XSLT">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test="contains(//*, 'CAM-AAA-0055')">
- <fault>
- <passport>timeout</passport>
- </fault>
- </xsl:when>
- <xsl:when test="contains(//*, 'CM-SYS-5027')">
- <fault>
- <xsl:copy>
- <xsl:copy-of select="/root/fault"/>
- </xsl:copy>
- </fault>
- </xsl:when>
- <xsl:otherwise>
- <soapFault>
- <xsl:copy>
- <xsl:copy-of select="/root/fault"/>
- </xsl:copy>
- </soapFault>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|