123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498 |
- <?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="false" 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>
- <!--
- ================================================================================
- 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="decodeExistingParameters" 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" type="exec" dependency="createParametersBlob" 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 information about agent
- ===============================================================================================
- -->
- <xts:block id="getContent" dependency="returnResult" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name = 'selected_path']!='' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <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/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" requester="AGS:load_agent">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <cm:query>
- <cm:search>
- <!-- Get the agent - we know only it's search path now -->
- <xsl:value-of select="/root/env/param[@name = 'selected_path']"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- Now that we have the base object details. Find out if it is an agent or agentView and modify the searchPath accordingly.
- Then make the call to get the needed report spec information.
- ===============================================================================================
- -->
- <xts:block id="checkObjectType" dependency="getContent" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name = 'selected_path']!='' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <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/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="obj_path">
- <xsl:value-of select="/root/env/param[@name='selected_path']"/>
- <xsl:choose>
- <xsl:when test="/root/cm:queryResponse/cm:queryReply[1]//*[local-name()='agentDefinition' ]/cm:defaultName">
- <xsl:text>/report</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>/reportView</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- now that we can tell if its a view or normal agent. Get the report details and append to where they ought to be-->
- <xts:append select="/root/*[local-name()='queryResponse']">
- <xts:transform src="ags/transforms/getChildren.xslt" processor="XSLT">
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" requester="AGS:load_agent">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <cm:query>
- <cm:search>
- <!-- Get the report - we want its package for the routing -->
- <xsl:value-of select="$obj_path"/>
- </cm:search>
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="metadataModelPackage"/>
- <cm:property name="metadataModel"/>
- <cm:property name="permissions"/>
- </cm:properties>
- <cm:options>
- <cm:refProps>
- <!-- get metadataModelPackage of the base properties using refProps incase we have a report view -->
- <cm:refProp refPropName="base">
- <cm:properties>
- <cm:property name="metadataModelPackage"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </cm:options>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:transform>
- </xts:append>
- <xts:append>
- <!--set up the next block -->
- <routingServerGroup>
- <objectPath><xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']//*[local-name()='metadataModelPackage']//*[local-name()='searchPath']/text()"/></objectPath>
- <objectPath><xsl:value-of select="/root/env/param[@name = 'selected_path']"/></objectPath>
- </routingServerGroup>
- <model><xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']//*[local-name()='metadataModel']//*[local-name()='searchPath']/text()"/></model>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="getRouting" dependency="checkObjectType" path="/ags/determineRouting.xslt" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name = 'selected_path']!='' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false"/>
- <!--
- ================================================================================
- encode the agent items again
- ================================================================================
- -->
- <xts:block id="buildContext" dependency="getRouting" processor="XSLT" type="exec" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = '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_encodeagentdefinition_settemplateid_dialogadapter003'), xtsext:web64encode( string( $markup ), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
-
- <!-- build the context -->
- <xsl:template name="buildContext">
- <context>
- <env>
- <xsl:variable name="selected_path_var">
- <xsl:value-of select="/root/env/param[@name='selected_path']"/>
- <xsl:choose>
- <xsl:when test=" /root/cm:queryResponse/cm:queryReply[1]//cm:objectClass = 'agentDefinition' ">
- <xsl:text>/report</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>/reportView</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- copy all the values which we need -->
- <param name="selected_path">
- <xsl:value-of select="$selected_path_var"/>
- </param>
- <!-- taskParameters is what stores the current values of the parameters/assignments -->
- <!-- only pass taskParameters into the context if the report is the same as it was last time -
- we don't want parameters which are defined on reportA being used on reportB -->
- <xsl:if test="not(/root/env/param[@name='m_obj']) or (/root/env/param[@name='m_obj'] = $selected_path_var)">
- <xsl:copy-of select="/root/env/param[@name='taskParameters']"/>
- </xsl:if>
- <!-- the m_rp_parameters which is the end result of the prompt pages -->
- <xsl:copy-of select="/root/env/param[@name='m_rp_parameters']"/>
- <!-- 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" dependency="buildContext" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' or /root/*[local-name()='morphletResponse']]" mandatory="false">
- <!-- logicsheets -->
- <xts:logicsheet path="ags/logicsheets/promptValues.xslt"/>
- <!-- the define condition ui -->
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <!-- Generic templates -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/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:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:out="http://www.w3.org/1999/XSL/Transform"
- xmlns:agspmt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/promptValues/"
- xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- 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:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:req-params="http://developer.cognos.com/schemas/request/params"
- exclude-result-prefixes="xsl out agspmt xsi agsdlg pf xtsext lyt dp df utml xts xos cm">
- <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>
- <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>
- <!-- declared a variable to determine if a report has been selected, used for validation purposes-->
- <xsl:variable name="hasReport">
- <xsl:choose>
- <xsl:when test="key('env-param','selected_path') != '' and /root/cm:queryResponse/cm:queryReply[1]//*[local-name()='agentDefinition' or local-name()='agentDefinitionView']/cm:defaultName">
- <xsl:text>true</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>false</xsl:text>
- </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">
- <!-- this defines the form command operation to be performed when all the collected properties are submitted... -->
- <!-- ================================================================ -->
- <!-- H E A D E R -->
- <!-- ================================================================ -->
- <utml:exclude-prefix>
- <xsl:value-of select="'pv_'"/>
- </utml:exclude-prefix>
- <!-- exclusion list should remove certain items but definately those which are passed in context to the async call -->
- <utml:exclusion-list><xsl:value-of select="' m_obj method cleared_prompts pageitem context m_rp_parameters has_prompts updatedTaskParameters '"/></utml:exclusion-list>
- <agsdlg:header>
- <dp:image>
- <img alt="" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$ags_image_root"/>icon_agent_24.gif</xsl:attribute>
- </img>
- </dp:image>
- <dp:title>
- <xts:string id="DIALOG_AGENT_TITLE"/>
- </dp:title>
- <dp:description>
- <xts:string id="DIALOG_AGENT_DESCRIPTION"/>
- </dp:description>
- </agsdlg:header>
- <!-- need this to be included by default -->
- <script type="text/javascript" src="../ags/dragDropHandler.js"/>
- <utml:input type="hidden" name="taskParameters" id="taskParameters"/>
- <!-- default value will bring in both agents and views -->
- <!--utml:input type="hidden" name="ags_select" value="default" utml:update="false"/>
- <utml:input type="hidden" name="m_class" value="agentDefinition" utml:update="false"/-->
- <utml:input type="hidden" name="report_visited" id="report_visited" value="true"/>
- <utml:input type="hidden" name="taskName" id="taskName" utml:update="false">
- <utml:value>
- <xsl:choose>
- <xsl:when test="$hasReport='true' and /root/cm:queryResponse/cm:queryReply[1]//*[local-name()='agentDefinition' or local-name()='agentDefinitionView']/cm:defaultName != '' ">
- <xsl:value-of select="/root/cm:queryResponse/cm:queryReply[1]//*[local-name()='agentDefinition' or local-name()='agentDefinitionView']/cm:defaultName"/>
- </xsl:when>
- <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:choose>
- </utml:value>
- </utml:input>
- <utml:input type="hidden" name="ui.routingServerGroup" id="ui.routingServerGroup" utml:update="false">
- <utml:value>
- <xsl:value-of select="/root/routingServerGroup/*[local-name() = 'result'][last()]"/>
- </utml:value>
- </utml:input>
- <utml:input type="hidden" name="model" id="model" utml:update="false">
- <utml:value>
- <xsl:value-of select="/root/model"/>
- </utml:value>
- </utml:input>
- <!-- ================================================================ -->
- <!-- B O D Y -->
- <!-- ================================================================ -->
- <!-- Define a new layout-->
- <lyt:layout style="2">
- <!-- create a new row, each row includes a spacer -->
- <lyt:section>
- <dp:textarea section3_align="left">
- <!-- the agent name label-->
- <dp:section1>
- <xts:string id="DIALOG_AGENT_LABEL"/>
- </dp:section1>
- <!-- the agent name input-->
- <dp:section2>
- <!-- get the name of the Agent -->
- <xsl:choose>
- <xsl:when test="$hasReport = 'true' and /root/cm:queryResponse/cm:queryReply[1]//*[local-name()='agentDefinition' or local-name()='agentDefinitionView']/cm:defaultName != '' ">
- <xsl:value-of select="/root/cm:queryResponse/cm:queryReply[1]//*[local-name()='agentDefinition' or local-name()='agentDefinitionView']/cm:defaultName"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>
- <xts:string id="DIALOG_MESSAGE_NONE"/>
- </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </dp:section2>
- <dp:section3>
- <a href="#" onclick="doSelectObject('agentTask.es', '{xtsext:javascriptencode(/root/env/param[@name = 'selected_path'])}')">
- <xts:string id="SELECT_AN_AGENT"/>
- </a>
- </dp:section3>
- </dp:textarea>
- </lyt:section>
- <lyt:section>
- <xsl:value-of select="key('request-param','suppressionDetails')" disable-output-escaping="yes"/>
- </lyt:section>
- </lyt:layout>
- <xsl:if test="$hasReport = 'true'">
- <lyt:layout style="1">
- <lyt:section width="100%">
- <dp:list title="DIALOG_PROMPT_OPTIONS" width="100%">
- <dp:section>
- <dp:hint wrap="wrap">
- <xts:string id="DIALOG_PROMPT_DESCRIPTION"/>
- </dp:hint>
- </dp:section>
- <dp:section>
- <div id="promptValuesDiv"/>
- </dp:section>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- </xsl:if>
- <dp:emptyFooter/>
- <script type="text/javascript">
- function init() {
- <xsl:if test="/root/env/param[@name='selected_path']">
- parent.getConfigFrame().cfgSet("so.defaultLocation", "<xsl:value-of select="xtsext:javascriptencode(/root/env/param[@name='selected_path'])"/>/..");
- </xsl:if>
- <xsl:if test="not(/root/env/param[@name='report_visited'])">
- <xsl:if test="not(/root/env/param[@name='selected_path'])">
- doSelectObject('agentTask.es')
- </xsl:if>
- </xsl:if>
- <xsl:if test="$hasReport = 'true'">
- loadParameters();
- </xsl:if>
- //let the listener know that this is a promptable report task
- var taskId = "<xsl:value-of select="xtsext:javascriptencode(/root/req-params:requestParams/req-params:param[@name='tabSelectedID'])"/>";
- var reportName = "<xsl:value-of select="/root/cm:queryResponse/cm:agentDefinition/cm:defaultName"/>";
- var reportPath = "storeID(\'<xsl:value-of select="/root/cm:queryResponse/cm:agentDefinition/cm:storeID"/>\')";
- parent.getConfigFrame().getAgentItemsListener().setReportTask(taskId, reportName, reportPath);
-
- }
- 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 );
- }
- <!-- the actual path to the report - which is needed in the call to getParameters -
- have to build this by hand cause we want to run against the report under the agent -->
- <xsl:variable name="obj_path">
- <xsl:value-of select="/root/env/param[@name='selected_path']"/>
- <xsl:choose>
- <xsl:when test="/root/cm:queryResponse/cm:queryReply[1]//*[local-name()='agentDefinition' ]/cm:defaultName">
- <xsl:text>/report</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>/reportView</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- var taskId = "<xsl:value-of select="xtsext:javascriptencode(/root/req-params:requestParams/req-params:param[@name='tabSelectedID'])"/>";
- var obj = "<xsl:value-of select="xtsext:javascriptencode(string($obj_path))"/>";
- var context = "<xsl:value-of select="xtsext:javascriptencode(/root/env/param[@name='context'])"/>";
- <!-- SEC_INFO the request is not parsed as a string so should not be subject to an injection attack. See getParameters.js for details-->
- var request = parent.getConfigFrame().getGetParameterRequestString(obj, context, obj+taskId);
- <xsl:if test="not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]//*[local-name() ='permissions'][contains(., 'execute') and contains(., 'read')] )">
- request += "&doSkip=true";
- </xsl:if>
- // do the request
- parent.getConfigFrame().startGetParametersRequest(request, parent.getConfigFrame().getGetParameterRequestString);
- }
-
- /*
- * validate the report page and popup an appropriate alert message
- */
- function validate() {
- var isValid = true;
- <xsl:if test="not($hasReport = 'true')">
- isValid = false;
-
- alert("<xts:string id="DIALOG_REPORT_NO_REPORT_NAME" encode="javascript"/>");
- </xsl:if>
- return isValid && validatePromptPage();
- }
- </script>
- <!-- build the scripts needed for prompting -->
- <xsl:call-template name="promptValuesScript"/>
- </utml:form>
- </xts:transform>
- </markup>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <agspmt:promptValuesScript/>
- </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:morphlet>
|