12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2015
- 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" includeConfig="true" requiredCapability="canUseEventStudio">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt"/>
- <!--
- ===============================================================================================
- Render the HTML page
- ===============================================================================================
- -->
- <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <xsl:template match="/">
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text>
- <html>
- <head>
- <script type="text/javascript">
- function init()
- {
- var agent_name = "<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='selected_path']))"/>";
- if (agent_name.length > 0) {
- var cf = parent.getConfigFrame();
- // set the message frame in the original - this will give us a clean sheet and we can get the load to clear up other things too
- cf.messageFrame_Params['m'] = '/ags/load_agent.xts';
- cf.messageFrame_Params['m_path'] = agent_name;
- cf.messageFrame_Params['ui.routingServerGroup'] = cf.UI_ROUTING_SERVER_GROUP;
- cf.messageFrame_Params['cafcontextid'] = cf.cafContextId;
- // also have to make the URL for the metadata IFrame load
- cf.metadataFrame_Params['m'] = '/ags/init_model.xts';
- cf.metadataFrame_Params['ui.object'] = agent_name;
- cf.metadataFrame_Params['ui.action'] = 'edit';
- cf.metadataFrame_Params['cafcontextid'] = cf.cafContextId;
- // load both message and metadata frames up
- cf.getCommandStackManager().getCommandStack().clear();
- cf.getCommandStackManager().getCommandStack().push("reloadFunctionsTree()");
- cf.getCommandStackManager().getCommandStack().push("reloadMetadataTree()");
- cf.getCommandStackManager().getCommandStack().push("loadMessageFrame()");
- cf.getCommandStackManager().getCommandStack().push("loadMetadataFrame()");
- // want to do these actions
- cf.getCommandStackManager().processCommandStack();
- }
- // nothing more to do here
- parent.showDialogFrame(0);
- }
- </script>
- </head>
- <!-- just do the redirect -->
- <body onload="init();">
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!-- Debug -->
- <!-- ============================================================================= -->
- <xts:block id="debug" condition=".[ /root/session/param[@name='debug'] = '1' ]" dependency="renderPage" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <!-- debug logic sheet -->
- <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>
|