123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2011, 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/config.xml, messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" requiredCapability="canUseAdministrationPortal">
- <!--
- ===============================================================================================
- formlogic_init
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ===============================================================================================
- getConfig - retrieve the configuration UI settings
- ===============================================================================================
- -->
- <xts:block id="getConfig" type="exec" mode="interpret" processor="XSLT" path="transforms/portal/rolapCubeConfigurations/getParameters.xslt" dependency="formlogic_init"/>
-
- <!--
- ===============================================================================================
- restoreEntires - restore the whole entries from env
- ===============================================================================================
- -->
- <xts:block id="restoreEntires" processor="XSLT" type="exec" mode="interpret"
- path="transforms/portal/rolapCubeConfigurations/restoreEntries.xslt"
- dependency="getConfig" mandatory="false"/>
-
- <!--
- ===============================================================================================
- format - render the page
- ===============================================================================================
- -->
- <xts:block id="format" mode="output" processor="XSLT" type="exec" dependency="restoreEntires" mimeType="text/html" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/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"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- 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:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- 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:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- exclude-result-prefixes="xsl cm pf lyt dp df dc cf cp utml xts xtsext pf">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- Global variables ======================== -->
- <pf:variables/>
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_RLP_CUBE_PROPERTIES_TITLE">
- <xts:param name="objectName">
- <span lang="{$contentLocale}"><xsl:value-of select="key('env-param', 'selected_localizedCube')"/></span>
- </xts:param>
- </xts:string>
- </xsl:variable>
- <xsl:variable name="selectedCubeConfiguration" select="/root/wholeEntries/*[*[local-name()='dataSourceName']=key('env-param', 'selected_cube')]"/>
- <xsl:variable name="prefix" select="'rlp_'"/>
- <xsl:variable name="encodedEditParams">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/paramsMetadata"/>
- </xsl:call-template>
- </xsl:variable>
- <!-- start the output -->
- <xsl:template match="/root">
- <pf:dojo>
- <require>com.ibm.cognos.ps.xts.validator.validate</require>
- </pf:dojo>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <dp:meta>
- <pf:meta/>
- <!-- Standard meta tags -->
- </dp:meta>
- <dp:script>
- <dc:confirm-cancel/>
- <pf:help context="HID_PROPERTIES"/>
- <!-- Help system -->
- <!-- Define selectall and deselectall functions.-->
- <dt:selectDeselectAll/>
- <script language="javascript">
- dojo.addOnLoad(function(){
- (new com.ibm.cognos.ps.xts.validator.validate(document.pform, {
- prefix: '<xsl:value-of select="$prefix"/>',
- toggleCheckboxName: 'rolap_properties_edit_checkbox',
- metadata: '<xsl:value-of select="xtsext:javascriptencode(string($encodedEditParams))"/>',
- defaultLimits: {
- minInclusive: 0,
- maxInclusive: <xsl:value-of select="xtsext:javascriptencode(key('system-param', 'integerMaximumValue'))"/>
- },
- message: {
- IDS_RLP_INDICATION_AND: '<xts:string id="IDS_RLP_INDICATION_AND" encode="javascript"/>',
- IDS_RLP_VALIDATE_NOT_A_NUMBER: '<xts:string id="IDS_RLP_VALIDATE_NOT_A_NUMBER" encode="javascript"/>',
- IDS_RLP_VALIDATE_OUT_OF_BOUNDARY: '<xts:string id="IDS_RLP_VALIDATE_OUT_OF_BOUNDARY" encode="javascript"/>',
- IDS_RLP_VALIDATE_EMPTY_VALUE: '<xts:string id="IDS_RLP_VALIDATE_EMPTY_VALUE" encode="javascript"/>'
- }
- })).init();
- });
- </script>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="key('env-param', 'has_write_permission') = 'false'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <utml:input type="hidden" name="ps_nav_op" value=""/>
- <utml:input type="hidden" name="controller_state" value="editEntry" utml:update="false"/>
- <input type="hidden" name="actionResourceID" value="{key('env-param', 'actionResourceID')}"/>
- <!-- deal with the readonly parameters -->
- <xsl:for-each select="/root/paramsMetadata/parameter[@readonly='true' and (@objectDependency='baseROLAPCubeConfiguration' or @objectDependency=name($selectedCubeConfiguration))]">
- <xsl:variable name="paramName" select="@name"/>
- <xsl:variable name="displayValue">
- <xsl:choose>
- <xsl:when test="$selectedCubeConfiguration/*[local-name()=$paramName] != ''">
- <xsl:value-of select="$selectedCubeConfiguration/*[local-name()=$paramName]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <input type="hidden" name="{concat($prefix, @name)}" id="{concat($prefix, @name)}" value="{$displayValue}"/>
- </xsl:for-each>
- <!-- header -->
- <!-- dialog header -->
- <xsl:variable name="useBackUrl" select="key('env-param', 'ps_nav_stack') = 'cogadmin/controls/datastores/editCubeConfiguration.xts'"/>
- <dp:header useBackURL="$useBackUrl">
- <!-- header titles-->
- <dp:title showName="false">
- <xsl:copy-of select="$browserTitle"/>
- </dp:title>
- <dp:description>
- <xts:string id="IDS_RLP_CUBE_PROPERTIES_INTRO"/>
- </dp:description>
- </dp:header>
- <lyt:layout style="1">
- <lyt:section>
- <cp:table name="ROLAPCubeConfigurationsEdit" showEmptyMsg="true" iterate="/root/paramsMetadata/parameter[@readonly!='true' and (@objectDependency='baseROLAPCubeConfiguration' or @objectDependency=name($selectedCubeConfiguration))]" width="100%" cellpadding="3">
- <cp:action>
- <xsl:if test="key('env-param', 'has_write_permission') = 'true'">
- <a href="#" id="resetToDefault">
- <xsl:text/><xts:string id="IDS_RLP_RESET_TO_DEFAULT"/><xsl:text/>
- </a>
- </xsl:if>
- </cp:action>
- <!-- table headers -->
- <cp:tableHeader>
- <cp:columnHeader width="16" toggleName="rolap_properties_edit_checkbox" utml="utml"/>
- <cp:columnHeader width="16"/>
- <cp:columnHeader width="60%">
- <xts:string id="IDS_RLP_NAME"/>
- </cp:columnHeader>
- <cp:columnHeader>
- <xts:string id="IDS_RLP_VALUE"/>
- </cp:columnHeader>
- </cp:tableHeader>
- <!-- table cantents -->
- <cp:tableContent>
- <!-- checkbox -->
- <cp:columnContent valign="top">
- <xsl:if test="key('env-param', 'has_write_permission') = 'true'">
- <input type="checkbox" name="{concat('rolap_properties_edit_checkbox_', @name)}" id="{concat('rolap_properties_edit_checkbox_', @name)}" value="{@name}">
- <xsl:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM" encode="html"><xts:param name="pagerItemName"><xsl:value-of select="@label"/></xts:param></xts:string></xsl:attribute>
- </input>
- </xsl:if>
- </cp:columnContent>
- <cp:columnContent>
- <img width="16" height="16">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root, 'icon_parameter.gif')"/></xsl:attribute>
- </img>
- </cp:columnContent>
- <cp:columnContent id="lbl_{@name}">
- <xsl:if test="@condition"><xsl:text>    </xsl:text></xsl:if>
- <xsl:value-of select="@label"/>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:variable name="paramName" select="@name"/>
- <xsl:variable name="displayValue">
- <xsl:choose>
- <xsl:when test="$selectedCubeConfiguration/*[local-name()=$paramName] != ''">
- <xsl:value-of select="$selectedCubeConfiguration/*[local-name()=$paramName]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="key('env-param', 'has_write_permission') = 'true'">
- <xsl:choose>
- <xsl:when test="@type='xsd:int'">
- <utml:input type="text" size="10" utml:update="true" utml:track="true" aria-labelledby="lbl_{@name}">
- <xsl:attribute name="id"><xsl:value-of select="concat($prefix, @name)"/></xsl:attribute>
- <utml:prefix><xsl:value-of select="$prefix"/></utml:prefix>
- <utml:name><xsl:value-of select="@name"/></utml:name>
- <utml:value><xsl:value-of select="$displayValue"/></utml:value>
- </utml:input>
- </xsl:when>
- <xsl:when test="@type='xsd:string'">
- <utml:input type="text" size="30" utml:update="true" utml:track="true" aria-labelledby="lbl_{@name}">
- <xsl:attribute name="id"><xsl:value-of select="concat($prefix, @name)"/></xsl:attribute>
- <utml:prefix><xsl:value-of select="$prefix"/></utml:prefix>
- <utml:name><xsl:value-of select="@name"/></utml:name>
- <utml:value><xsl:value-of select="$displayValue"/></utml:value>
- </utml:input>
- </xsl:when>
- <xsl:when test="@type='xsd:boolean' or @type='cm:automaticAggregateOptimizationEnum'">
- <xsl:variable name="trueValue">
- <xsl:choose>
- <xsl:when test="@trueValue"><xsl:value-of select="@trueValue"/></xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <utml:input type="checkbox" utml:track="true" utml:update="true" utml:default-condition="$displayValue=$trueValue" style="text-indent: -4px; margin-left: 0pt;" aria-labelledby="lbl_{@name}">
- <xsl:attribute name="id"><xsl:value-of select="concat($prefix, @name)"/></xsl:attribute>
- <utml:prefix><xsl:value-of select="$prefix"/></utml:prefix>
- <utml:name><xsl:value-of select="@name"/></utml:name>
- <utml:value><xsl:value-of select="$trueValue"/></utml:value>
- </utml:input>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="@type='xsd:boolean' or @type='cm:automaticAggregateOptimizationEnum'">
- <xsl:variable name="trueValue">
- <xsl:choose>
- <xsl:when test="@trueValue"><xsl:value-of select="@trueValue"/></xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="$displayValue=$trueValue"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$displayValue"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </cp:columnContent>
- </cp:tableContent>
- </cp:table>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <xsl:choose>
- <xsl:when test="key('env-param', 'has_write_permission') = 'true'">
- <xsl:choose>
- <xsl:when test="key('env-param', 'ps_nav_stack') = 'cogadmin/controls/datastores/editCubeConfiguration.xts'">
- <df:button df:id="IDS_OK" utml:validate="false" df:style="stack-down" onclick="return validateAndSave();"/>
- <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="document.pform.controller_state.value='close';parent.ui_modal_dialog.close();"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_OK" utml:validate="true" df:style="stack-down-save"/>
- <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_class') = 'configurationFolder'">
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CLOSE" df:style="stack-down"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- <script>
- function validateAndSave() {
- if(validate()) {
- var eAutoOptimizeInMemAggr = document.getElementById('rlp_automaticAggregateOptimizationEnabled');
- if (eAutoOptimizeInMemAggr) {
- var eAggregateCacheSize = document.getElementById('rlp_aggregateCacheSize');
- if (eAggregateCacheSize && (eAggregateCacheSize.value == '0') && (eAutoOptimizeInMemAggr.checked)) {
- alert('<xts:string id="IDS_RLP_AGGREGATE_OPTIMIZE_NEEDS_MEMORY" encode="javascript"><xts:param name="aggregateCacheSizePropName"><xsl:value-of select="xtsext:javascriptencode(normalize-space(string(/root/paramsMetadata/parameter[@name='aggregateCacheSize']/@label)))"/></xts:param></xts:string>');
- eAggregateCacheSize.select();
- return false;
- }
- }
- setTimeout('parent.ui_modal_dialog.close();',1);
- return true;
- } else {
- return false;
- }
- }
- </script>
- </utml:form>
- </dp:page>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <!-- Debug -->
- <xts:block id="debug" type="exec" dependency="format" mode="output" condition=".[ /root/session/param[@name='debug'] = '1' ]" processor="XSLT" mandatory="false" mimeType="text/html">
- <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" omit-xml-declaration="yes"/>
- <dbg:templates/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|