123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <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">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- exclude-result-prefixes="xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:transform src="/portal/config_rt_ui.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/config.xml</xts:param>
- <root/>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- Load object-specific property tabs map ============================================================== -->
- <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml"/>
- <!--
- ===============================================================================================
- set_session_sort
- ===============================================================================================
- -->
- <xts:block id="set_session_sort" type="exec" mode="interpret" processor="XSLT" path="/portal/set_session_sort.xml" condition=".[/root/cookies/cookie[@name='cc_session']]" mandatory="false"/>
- <!--
- ===============================================================================================
- getContent - get our data from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init getConfig set_session_sort">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="xsl send cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:variable name="isService" select="/root/system/param[@name='ui_objects']/object[@class=key('env-param','m_class')]/@service = 'T'"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/portal/config/post-process.xslt" processor="XSLT">
- <results>
- <productLocale><xsl:value-of select="/root/user/param[@name='productLocale']"/></productLocale>
- <sortkey>
- <xsl:value-of select="/root/session/param[@name='s_set']"/>
- </sortkey>
- <isService><xsl:value-of select="$isService"/></isService>
- <xts:queryNode select="/root/config"/>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <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 xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="key('env-param','m_obj')"/>
- </cm:search>
- <cm:properties>
- <xsl:for-each select="/root/config/section/parameter">
- <xsl:choose>
- <xsl:when test="@name = 'qsROLAPCubeConfigurations'">
- <xsl:if test="$isService">
- <cm:property>
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- </cm:property>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <cm:property>
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- </cm:property>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <cm:property name="permissions"/>
- </cm:properties>
- <cm:options schemaInfo="true"/>
- </cm:query>
- <!-- if we're not dealing with a service then we need to query for the installed components -->
- <xsl:if test="not($isService)">
- <cm:query>
- <cm:search>
- <xsl:value-of select="key('env-param','m_obj')"/>
- <xsl:if test="key('env-param','m_class') != 'dispatcher'">
- <xsl:text>//*[@objectClass = 'dispatcher']</xsl:text>
- </xsl:if>
- <xsl:text>/installedComponent</xsl:text>
- </cm:search>
- <cm:properties>
- <cm:property name="componentID"/>
- </cm:properties>
- </cm:query>
- </xsl:if>
- <!-- if not dispatcher or service query CM for all visible dispatchers -->
- <xsl:if test="not($isService) and key('env-param','m_class') != 'dispatcher'">
- <cm:query>
- <cm:search>
- <xsl:value-of select="key('env-param','m_obj')"/>
- <xsl:text>//*[@objectClass = 'dispatcher']</xsl:text>
- <xsl:value-of select="/root/system/param[@name='visible']"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- </cm:properties>
- </cm:query>
- </xsl:if>
- <!-- This needs to be the last query since config/post-process.xslt will let it through untouched. -->
- <cm:query>
- <cm:search>
- <xsl:value-of select="key('env-param','m_obj')"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </results>
- </xts:transform>
- </xts:append>
-
- <xts:delete select="/root/env/param[@name='pagerfrom']"/>
- <xts:delete select="/root/env/param[@name='pagerto']"/>
- <xts:delete select="/root/env/param[@name='pagerfrom_d']"/>
- <xts:delete select="/root/env/param[@name='pagerto_d']"/>
-
- <!-- Removed the reset flags for those properties who has been changed. -->
- <xsl:for-each select="/root/env/param[starts-with(@name, 'reset_') and (@name != 'reset_advancedSettings' or @name != 'reset_rdsGatewayMappings')]">
- <xsl:variable name="nm" select="@name"/>
- <xsl:variable name="p_nm" select="substring-after(@name, 'reset_')"/>
- <xsl:if test="/root/env/param[starts-with(@name, 'changed_m_pc_') and substring(@name, 16) = $p_nm] and /root/env/param[starts-with(@name, 'changed_m_pc_') and substring(@name, 16) = $p_nm] != '0'">
- <xts:delete select="/root/env/param[@name = '{$nm}']"/>
- </xsl:if>
- <xsl:variable name="changedDurationUnitNbr" select="/root/env/param[starts-with(@name, 'changed_dura_property_') and substring(@name, 25) = $p_nm]"/>
- <xsl:variable name="changedDurationUnit" select="/root/env/param[starts-with(@name, 'changed_durationSelect_') and substring-after(@name, 'changed_durationSelect_') = $p_nm]"/>
- <xsl:if test="$changedDurationUnitNbr='1' or $changedDurationUnit='1'">
- <xts:delete select="/root/env/param[@name = '{$nm}']"/>
- </xsl:if>
-
- </xsl:for-each>
- <xsl:for-each select="/root/env/param[starts-with(@name, 'resetroot_') and (@name != 'resetroot_advancedSettings' or @name != 'resetroot_rdsGatewayMappings')]">
- <xsl:variable name="nm" select="@name"/>
- <xsl:variable name="p_nm" select="substring-after(@name, 'resetroot_')"/>
- <xsl:if test="/root/env/param[starts-with(@name, 'changed_m_pc_') and substring(@name, 16) = $p_nm] and /root/env/param[starts-with(@name, 'changed_m_pc_') and substring(@name, 16) = $p_nm] != '0'">
- <xts:delete select="/root/env/param[@name = '{$nm}']"/>
- </xsl:if>
-
- <xsl:variable name="changedDurationUnitNbr" select="/root/env/param[starts-with(@name, 'changed_dura_property_') and substring(@name,25) = $p_nm]"/>
- <xsl:variable name="changedDurationUnit" select="/root/env/param[starts-with(@name, 'changed_durationSelect_') and substring-after(@name, 'changed_durationSelect_') = $p_nm]"/>
- <xsl:if test="$changedDurationUnitNbr='1' or $changedDurationUnit='1'">
- <xts:delete select="/root/env/param[@name = '{$nm}']"/>
- </xsl:if>
- </xsl:for-each>
-
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- appendParam - make sure each property is placed in the DOM tree.
- ===============================================================================================
- -->
- <xts:block id="appendParam" processor="XSLT" type="exec" condition=".[not(/root/env/param[starts-with(@name, 'm_pc_')])]" dependency="getContent" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" version="1.0">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/env">
- <xsl:for-each select="/root/cm:queryResponse/cm:queryReply[1]/node()/*[not(local-name()='objectClass') and not(local-name()='permissions') and not(local-name()='advancedSettings')]">
- <xsl:variable name="param_name">
- <xsl:choose>
- <xsl:when test="@acquired = 'true'"><xsl:value-of select="concat('m_pc_a_', local-name())"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="concat('m_pc_n_', local-name())"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <param name="{$param_name}"><xsl:value-of select="."/></param>
- <param name="changed_{$param_name}">0</param>
- </xsl:for-each>
- <!-- build up the advance settings information. Only need to do this when we're dealing with the configuration object
- since the user can do a 'delete all child values' and the save mophlets needs to match on these params -->
- <xsl:if test="contains(' configuration ', concat(' ',/root/env/param[@name='m_class'],' ') )">
- <xsl:for-each select="/root/cm:queryResponse/cm:queryReply[1]/node()/*[local-name()='advancedSettings']/*/*[local-name()='setting']">
- <param name="{concat('m_pa_n', position())}"><xsl:value-of select="@name"/></param>
- <param name="{concat('m_pa_v', position())}"><xsl:value-of select="."/></param>
- </xsl:for-each>
- </xsl:if>
- <!-- build up the gateway mappings information. Only need to do this when we're dealing with the configuration object
- since the user can do a 'delete all child values' and the save mophlets needs to match on these params -->
- <xsl:if test="contains(' configuration ', concat(' ',/root/env/param[@name='m_class'],' ') )">
- <xsl:for-each select="/root/cm:queryResponse/cm:queryReply[1]/node()/*[local-name()='rdsGatewayMappings']/*[local-name()='gatewayMapping']">
- <param name="{concat('map_external_', position())}"><xsl:value-of select="@externalURI"/></param>
- <param name="{concat('map_internal_', position())}"><xsl:value-of select="@internalURI"/></param>
- </xsl:for-each>
- </xsl:if>
-
- <!-- build up the boolean override information. -->
- <xsl:if test="contains(' configuration ', concat(' ',/root/env/param[@name='m_class'],' ') )">
- <xsl:variable name="overrideOptions" select="/root/cm:queryResponse/cm:queryReply[1]/node()/*[starts-with(local-name(),'optionArrayProp_')][1]"/>
- <xsl:for-each select="$overrideOptions/options/*[local-name()='overrideOptions' or local-name()='serviceDefaultOptions']/*">
- <xsl:variable name="attrName" select="concat(name(..),'_',substring-after(@name,'#'))"/>
- <param name="{$attrName}"><xsl:value-of select="."/></param>
- </xsl:for-each>
- </xsl:if>
-
- </xts:append>
-
- <!--
- Add the necessary changed input
- This could/should be in a seperate block when the issue with the changed inputs not being set to 0 after
- a parent reset is performed
- -->
- <xsl:for-each select="/root/env/param[starts-with(@name, 'changed_dura_property_')]">
- <xsl:variable name="propName" select="substring(@name,25)"/>
- <xsl:if test="contains(@name,'changed_dura_property_a_')">
- <xts:append select="/root/env">
- <param name="changed_dura_property_n_{$propName}"><xsl:value-of select="."/></param>
- </xts:append>
- </xsl:if>
- <xsl:if test="contains(@name,'changed_dura_property_n_')">
- <xts:append select="/root/env">
- <param name="changed_dura_property_a_{$propName}"><xsl:value-of select="."/></param>
- </xts:append>
- </xsl:if>
- </xsl:for-each>
-
-
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- Select or deselect entire list based on param "paging_control_op"
- ===============================================================================================
- -->
- <xts:block id="pagerCtrlCommand" dependency="getContent" type="exec" mode="interpret" processor="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/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="op" select="/root/env/param[@name = 'listop']"/>
- <xsl:variable name="isRoot">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_class'] = 'configuration' ">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:choose>
- <xsl:when test="$op = 'reset'">
- <xsl:for-each select="/root/env/param[starts-with(@name, 'checkbox_')]">
- <xsl:choose>
- <xsl:when test="$isRoot = 'true'">
- <xsl:if test="not (/root/env/param[@name=concat('resetroot_', string(.))])">
- <xts:delete select="/root/env/param[@name='resetroot_{.}']"/>
- <xts:append select="/root/env">
- <param name="resetroot_{.}">1</param>
- </xts:append>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="not (/root/env/param[@name=concat('reset_', string(.))])">
- <xts:delete select="/root/env/param[@name='reset_{.}']"/>
- <xts:append select="/root/env">
- <param name="reset_{.}">1</param>
- </xts:append>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:if test="/root/env/param[starts-with(@name, 'checkbox_')] = 'advancedSettings'">
- <xts:delete select="/root/env/param[starts-with(@name,'m_pa_') or @name='replace']"/>
- </xsl:if>
- <xsl:if test="/root/env/param[starts-with(@name, 'checkbox_')] = 'rdsGatewayMappings'">
- <xts:delete select="/root/env/param[starts-with(@name,'map_') or @name='replace']"/>
- </xsl:if>
- <xsl:if test="/root/env/param[starts-with(@name, 'checkbox_')] = 'jmxProxyHostDispatchers'">
- <xts:delete select="/root/env/param[@name='jmxProxyHostDispatchers' or @name='replace']"/>
- <xts:append select="/root/env">
- <param name="jmxProxyHostDispatchers"/>
- </xts:append>
- </xsl:if>
- <xts:delete select="/root/env/param[starts-with(@name, 'checkbox_')]"/>
- </xsl:when>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getParentContent - get our parent data from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getParentContent" processor="XSLT" type="exec" condition=".[/root/env/param[starts-with(@name, 'reset_')] and /root/env/param[@name='m_class'] !='configuration']" mandatory="false" dependency="getConfig set_session_sort pagerCtrlCommand">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <parent>
- <xts:transform src="transforms/portal/config/post-process.xslt" processor="XSLT">
- <results>
- <parentInfo>true</parentInfo>
- <sortkey>
- <xsl:value-of select="/root/session/param[@name='s_set']"/>
- </sortkey>
- <xts:queryNode select="/root/config"/>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="concat(/root/env/param[@name='m_obj'], '/..')"/>
- </cm:search>
- <cm:properties>
- <xsl:for-each select="/root/config/section/parameter">
- <cm:property>
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- </cm:property>
- </xsl:for-each>
- </cm:properties>
- <cm:options schemaInfo="true"/>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </results>
- </xts:transform>
- </parent>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- renderPage - render the HTML page
- ===============================================================================================
- -->
- <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="pagerCtrlCommand getParentContent appendParam formlogic_init getTabs">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- get the ContentManager logic sheet -->
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <!-- Dialog specific logicsheets -->
- <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/presentation/dialog/confirm.xslt"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/propertiesSettings/durationProperty.xslt"/>
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <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:psdp="http://developer.cognos.com/schemas/xts/logicsheet/xslt/propertiesSettings/durationProperty/"
- 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:thm="http://developer.cognos.com/schemas/xts/logicsheets/xslt/theme/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- exclude-result-prefixes="xsl cm cml thm utml send xtsext cf cp dc dt df dp lyt pf xts">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'properties_settings.xts'"/>
- <xsl:variable name="edit-form" select="'pform'"/>
- <xsl:variable name="promptLocale" select="$productLocale"/>
- <xsl:variable name="promptFormName" select="$edit-form"/>
- <xsl:variable name="promptBrowserMode">
- <xsl:choose>
- <xsl:when test="$browser = 'ie' ">IE5</xsl:when>
- <xsl:when test="$browser = 'moz' ">NS6</xsl:when>
- <xsl:when test="$browser = 'safari' ">safari</xsl:when>
- <xsl:otherwise>NS4</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="skin" select="key('user-param', 'skin')"/>
- <pf:variables/>
-
- <psdp:durationConvertors/>
- <xsl:key name="category-labels" match="/root/*[local-name()='config']/*[local-name()='section']" use="@name"/>
- <xsl:key name="valid-categories" match="/root/cm:queryResponse/cm:queryReply/*/*" use="@category"/>
- <xsl:include href="p_include.xsl"/>
- <!-- back-url must be defined, but not used -->
- <xsl:variable name="back-url" select="''"/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="browserTitle"><xts:string id="IDS_PROPERTIES_TITLE"><xts:param name="objectName"><span lang="{$contentLocale}"><xsl:value-of select="/root/cm:queryResponse/cm:queryReply[position()=last()]/*/cm:defaultName"/></span></xts:param></xts:string></xsl:variable>
- <xsl:variable name="filter">
- <xsl:choose>
- <xsl:when test="key('env-param', 's_filter')">
- <xsl:value-of select="key('env-param', 's_filter')"/>
- </xsl:when>
- <xsl:otherwise>_all_</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <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>
- <pf:help context="HID_SERVERS_CONFIGURE"/> <!-- Help system -->
- <!-- Define selectall and deselectall functions.-->
- <dt:selectDeselectAll/>
- <xsl:call-template name="getPromptCommonIncludes"/>
- <xsl:call-template name="gettextBoxIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- <dt:FloatTextBoxJavaScript/>
- <script language="javascript">
- <!-- when reseting to default or parent value, need to clear the fields in case there are invalide
- value which would cause a caf error - Trakker 486550 -->
- function clearSelectedFields()
- {
- var form = document.pform;
- <xsl:for-each select="/root/cm:queryResponse/cm:queryReply[1]/node()/*[not(local-name()='permissions') and not(local-name()='objectClass') and (@category=$filter or '_all_'=$filter)]">
- <xsl:variable name="acquire">
- <xsl:choose>
- <xsl:when test="@acquired = 'true'">a</xsl:when>
- <xsl:otherwise>n</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- e = form.m_pc_<xsl:value-of select="xtsext:javascriptencode(string(concat($acquire, '_', local-name())))"/>;
- var floatDisplayBoxName = getDisplayBoxName(form,e);
- var guiType = '<xsl:value-of select="@guiType"/>';
- <!-- only need to clear the text inputs on the current page -->
- if (e != null && (e.type == 'text' || (floatDisplayBoxName != null && form.elements[floatDisplayBoxName].type == 'text')))
- {
- <!-- is the associated checkbox checked? -->
- if (form.checkbox_<xsl:value-of select="position()"/> && form.checkbox_<xsl:value-of select="position()"/>.checked)
- {
- e.value = '';
- if (floatDisplayBoxName != null)
- {
- form.elements[floatDisplayBoxName].value = '';
- }
- }
- }
- <!-- Check for brsChartHotspotLimit and rsChartHotspotLimit which are of type guiType -->
- else if (e != null && guiType == 'nilInt' && e.type == 'hidden')
- {
- if (form.checkbox_<xsl:value-of select="position()"/> && form.checkbox_<xsl:value-of select="position()"/>.checked)
- {
- var displayBox;
- var name = '<xsl:value-of select="xtsext:javascriptencode(string(concat($acquire, '_', local-name())))"/>';
- var defaultValue = '<xsl:value-of select="xtsext:javascriptencode(string(@default))"/>';
- e.value = defaultValue;
- displayBox = form.elements['editField_m_pc_' + name];
- if (displayBox != null && defaultValue!='') {
- displayBox.value = defaultValue;
- }
- }
- }
- </xsl:for-each>
- }
- function validate()
- {
- var form = document.pform;
- if (form == null)
- return true;
- if (form.listop.value == 'reset')
- {
- var i;
- var items = form.elements.length;
- for (i=0; i<items; i++)
- {
- var e = form.elements[i];
- if ((e.name.substring(0,9) == "checkbox_") && e.checked)
- break;
- }
- if (i >= items)
- {
- window.alert("<xts:string id="IDS_ERR_NO_SELECTION" encode="javascript"/>");
- form.listop.value = '';
- return false;
- }
-
- <!-- we need to validate all the fields that aren't selected -->
- if(!doValidation(false))
- return false;
- <!-- clear all the select text fields to avoid CAF errors -->
- clearSelectedFields();
-
- return true;
- }
- else
- {
- return doValidation(true);
- }
- }
-
- function doValidation(checkSelected)
- {
- var form = document.pform;
- var e;
- var eFocus;
- <xsl:for-each select="/root/cm:queryResponse/cm:queryReply[1]/node()/*[not(local-name()='permissions') and not(local-name()='objectClass') and (@category=$filter or '_all_'=$filter)]">
- <xsl:variable name="acquire">
- <xsl:choose>
- <xsl:when test="@acquired = 'true'">a</xsl:when>
- <xsl:otherwise>n</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- e = form.m_pc_<xsl:value-of select="xtsext:javascriptencode(string(concat($acquire, '_', local-name())))"/>;
- if (!e) {
- e = form.dura_property_<xsl:value-of select="xtsext:javascriptencode(string(concat($acquire, '_', local-name())))"/>;
- }
- var guiType = '<xsl:value-of select="@guiType"/>';
- var floatDisplayBoxName = getDisplayBoxName(form,e);
- <!-- only validate the form variables for the current page in the pager. -->
- if (e != null && ((e.type == 'hidden' && guiType == 'nilInt') || e.type != 'hidden' || (floatDisplayBoxName != null && form.elements[floatDisplayBoxName].type != 'hidden')))
- {
- if (guiType == 'nilInt' && e.type == 'hidden') {
- var name = '<xsl:value-of select="xtsext:javascriptencode(string(concat($acquire, '_', local-name())))"/>';
- eFocus = form.elements['editField_m_pc_' + name];
- if (eFocus == null) {
- eFocus = e;
- }
- }
- else
- {
- eFocus = e;
- }
- <!-- is the associated checkbox checked, and if yes should we be validating it? -->
- if (form.checkbox_<xsl:value-of select="position()"/> && (checkSelected || !form.checkbox_<xsl:value-of select="position()"/>.checked))
- {
- <!-- cm:baseClassArrayProp and cm:anyTypeProp are not supported -->
- <!-- if a length restriction was specified -->
- <xsl:if test="@length or @minLength or @maxLength">
- if (validate_length(e,'<xsl:value-of select="@length"/>','<xsl:value-of select="@minLength"/>','<xsl:value-of select="@maxLength"/>', eFocus) == false)
- return false;
- </xsl:if>
- <xsl:choose>
- <!-- if a min or max restriction was specified -->
- <xsl:when test="@minInclusive != '' or @minExclusive != '' or @maxInclusive != '' or @maxExclusive != ''">
- if (validate_min_max(e,
- <xsl:choose>
- <xsl:when test="@minInclusive != ''">
- <xsl:value-of select="@minInclusive"/>
- <xsl:text>,null,</xsl:text>
- </xsl:when>
- <xsl:when test="@minExclusive != ''">
- <xsl:text>null,</xsl:text>
- <xsl:value-of select="@minExclusive"/>
- <xsl:text>,</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>null,null,</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="@maxInclusive != ''">
- <xsl:value-of select="@maxInclusive"/>
- <xsl:text>,null</xsl:text>
- </xsl:when>
- <xsl:when test="@maxExclusive != ''">
- <xsl:text>null,</xsl:text>
- <xsl:value-of select="@maxExclusive"/>
- </xsl:when>
- <xsl:otherwise>null,null</xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="contains(' nonNegativeIntegerProp positiveIntegerProp floatProp intProp durationProp ', concat(' ', substring-after(@type,':'), ' '))">
- <xsl:text>,'</xsl:text>
- <xsl:value-of select="substring-after(@type,':')"/>
- <xsl:text>'</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>,null</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="@guiType = 'nilInt'">
- <xsl:text>,'</xsl:text>
- <xsl:value-of select="@guiType"/>
- <xsl:text>'</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>,null</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>,
- eFocus)==false)</xsl:text>
- return false;
- </xsl:when>
- <xsl:otherwise>
- if (validate_max_range(e <xsl:text>,'</xsl:text><xsl:value-of select="substring-after(@type,':')"/><xsl:text>'</xsl:text>
- <xsl:choose>
- <xsl:when test="@guiType = 'nilInt'">
- <xsl:text>,'</xsl:text>
- <xsl:value-of select="@guiType"/>
- <xsl:text>'</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>,null</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>,
- eFocus)==false)</xsl:text>
- return false;
- </xsl:otherwise>
- </xsl:choose>
- <!-- no validation on type string and boolean -->
- <xsl:if test="contains(' nonNegativeIntegerProp positiveIntegerProp floatProp intProp anyURIProp nmtokenProp durationProp ', concat(' ', substring-after(@type,':'), ' '))">
- <xsl:choose>
- <xsl:when test="@guiType != ''">
- if (validate_<xsl:value-of select="@guiType"/>(e, eFocus) == false)
- return false;
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="not (@mandatory = 'true')">
- <!-- for non-mandatory field, the blank value should be allowed -->
- if (e.value != '') {
- if (validate_<xsl:value-of select="substring-after(@type,':')"/>(e, eFocus) == false)
- return false;
- }
- </xsl:when>
- <xsl:otherwise>
- if (validate_<xsl:value-of select="substring-after(@type,':')"/>(e, eFocus) == false)
- return false;
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- }
- }
- </xsl:for-each>
-
- return true;
- }
- function setFocus(e)
- {
- var form=document.pform;
- var floatDisplayBoxName = getDisplayBoxName(form,e);
- if (floatDisplayBoxName != null)
- {
- form.elements[floatDisplayBoxName].focus();
- }
- else
- {
- e.focus();
- }
- }
- function validate_nilInt (e, eFocus) {
- if (e.value == '')
- return true;
- if (e.value < 0 || isNaN(e.value) || parseInt(e.value, 10) != e.value)
- {
- window.alert("<xts:string id="IDS_ERR_NON_NEGATIVE" encode="javascript"/>");
- setFocus(eFocus);
- return false;
- }
- e.value = parseInt(e.value, 10);
- }
- <!-- Check to make sure that the value is between min and max -->
- function validate_min_max(e, minInc, minExc, maxInc, maxExc, type, guiType, eFocus)
- {
- if (guiType == 'nilInt' && e.value == '')
- {
- return true;
- }
- var valueType;
- if (type == 'nonNegativeIntegerProp' || type == 'positiveIntegerProp' || type == 'intProp' || type == 'durationProp')
- valueType = 'int';
- else
- valueType = 'float';
- var validValue = true;
- if (valueType == 'int' && ( isNaN(e.value) || parseInt(e.value, 10) != e.value))
- validValue = false;
- else if (valueType == 'float' && (isNaN(e.value) || parseFloat(e.value) != e.value))
- validValue = false;
-
- <!-- if no max values are supplied for int types, then hardcode to max java int value -->
- var generateDataTypeMsg = false;
-
- if (valueType == 'int' && maxInc==null && maxExc==null)
- {
- var max = '<xsl:value-of select="key('system-param', 'integerMaximumValue')"/>';
- maxInc = max - 0 ; //Default value such as 2147483647;
- generateDataTypeMsg = true;
- }
- var MSG_DATATYPE_OUT_OF_RANGE = "<xts:string id="IDS_ERR_MAX_INT_01" encode="javascript"><xts:param name="max">" + maxInc + "</xts:param></xts:string>";
- if (minInc!=null)
- {
- if (maxInc)
- {
- if (e.value < minInc || e.value > maxInc || !validValue)
- {
- var MSG_MIN_MAX_INT_04 = "<xts:string id="IDS_ERR_MIN_MAX_INT_04" encode="javascript"><xts:param name="min">" + minInc + "</xts:param><xts:param name="max">" + maxInc + "</xts:param></xts:string>";
- var MSG_MIN_MAX_FLOAT_04 = "<xts:string id="IDS_ERR_MIN_MAX_FLOAT_04" encode="javascript"><xts:param name="min">" + minInc + "</xts:param><xts:param name="max">" + maxInc + "</xts:param></xts:string>";
- if (valueType=='int' && generateDataTypeMsg == true)
- window.alert(MSG_DATATYPE_OUT_OF_RANGE);
- else if (valueType=='int' && generateDataTypeMsg == false)
- window.alert(MSG_MIN_MAX_INT_04);
- else
- window.alert(MSG_MIN_MAX_FLOAT_04);
- setFocus(eFocus);
-
- return false;
- }
- }
- else if (maxExc)
- {
- if (e.value < minInc || e.value >= maxExc || !validValue)
- {
- var MSG_MIN_MAX_INT_02 = "<xts:string id="IDS_ERR_MIN_MAX_INT_02" encode="javascript"><xts:param name="min">" + minInc + "</xts:param><xts:param name="max">" + maxExc + "</xts:param></xts:string>";
- var MSG_MIN_MAX_FLOAT_02 = "<xts:string id="IDS_ERR_MIN_MAX_FLOAT_02" encode="javascript"><xts:param name="min">" + minInc + "</xts:param><xts:param name="max">" + maxExc + "</xts:param></xts:string>";
- if (valueType=='int')
- window.alert(MSG_MIN_MAX_INT_02);
- else
- window.alert(MSG_MIN_MAX_FLOAT_02);
- setFocus(eFocus);
-
- return false;
- }
- }
- else if (e.value < minInc || !validValue)
- {
- var MSG_MIN_INT_01 = "<xts:string id="IDS_ERR_MIN_INT_01" encode="javascript"><xts:param name="min">" + minInc + "</xts:param></xts:string>";
- var MSG_MIN_FLOAT_01 = "<xts:string id="IDS_ERR_MIN_FLOAT_01" encode="javascript"><xts:param name="min">" + minInc + "</xts:param></xts:string>";
- if (valueType=='int')
- window.alert(MSG_MIN_INT_01);
- else
- window.alert(MSG_MIN_FLOAT_01);
- setFocus(eFocus);
-
- return false;
- }
- }
- else if (minExc!=null)
- {
- if (maxInc)
- {
- if (e.value <= minExc || e.value > maxInc || !validValue)
- {
- var MSG_MIN_MAX_INT_03 = "<xts:string id="IDS_ERR_MIN_MAX_INT_03" encode="javascript"><xts:param name="min">" + minExc + "</xts:param><xts:param name="max">" + maxInc + "</xts:param></xts:string>";
- var MSG_MIN_MAX_FLOAT_03 = "<xts:string id="IDS_ERR_MIN_MAX_FLOAT_03" encode="javascript"><xts:param name="min">" + minExc + "</xts:param><xts:param name="max">" + maxInc + "</xts:param></xts:string>";
-
- if (valueType=='int' && generateDataTypeMsg == true)
- window.alert(MSG_DATATYPE_OUT_OF_RANGE);
- else if (valueType=='int' && generateDataTypeMsg == false)
- window.alert(MSG_MIN_MAX_INT_03);
- else
- window.alert(MSG_MIN_MAX_FLOAT_03);
- setFocus(eFocus);
- return false;
- }
- }
- else if (maxExc)
- {
- if (e.value <= minExc || e.value >= maxExc || !validValue)
- {
- var MSG_MIN_MAX_INT_01 = "<xts:string id="IDS_ERR_MIN_MAX_INT_01" encode="javascript"><xts:param name="min">" + minExc + "</xts:param><xts:param name="max">" + maxExc + "</xts:param></xts:string>";
- var MSG_MIN_MAX_FLOAT_01 = "<xts:string id="IDS_ERR_MIN_MAX_FLOAT_01" encode="javascript"><xts:param name="min">" + minExc + "</xts:param><xts:param name="max">" + maxExc + "</xts:param></xts:string>";
- if (valueType=='int')
- window.alert(MSG_MIN_MAX_INT_01);
- else
- window.alert(MSG_MIN_MAX_FLOAT_01);
- setFocus(eFocus);
-
- return false;
- }
- }
- else if (e.value <= minExc || !validValue)
- {
- var MSG_MIN_INT_02 = "<xts:string id="IDS_ERR_MIN_INT_02" encode="javascript"><xts:param name="min">" + minExc + "</xts:param></xts:string>";
- var MSG_MIN_FLOAT_04 = "<xts:string id="IDS_ERR_MIN_FLOAT_02" encode="javascript"><xts:param name="min">" + minExc + "</xts:param></xts:string>";
- if (valueType=='int')
- window.alert(MSG_MIN_INT_02);
- else
- window.alert(MSG_MIN_FLOAT_04);
- setFocus(eFocus);
-
- return false;
- }
- }
- else if (maxInc != null && (e.value > maxInc || !validValue))
- {
- var MSG_MAX_INT_01 = "<xts:string id="IDS_ERR_MAX_INT_01" encode="javascript"><xts:param name="max">" + maxInc + "</xts:param></xts:string>";
- var MSG_MAX_FLOAT_01 = "<xts:string id="IDS_ERR_MAX_FLOAT_01" encode="javascript"><xts:param name="max">" + maxInc + "</xts:param></xts:string>";
- if (valueType=='int' && generateDataTypeMsg == true)
- window.alert(MSG_DATATYPE_OUT_OF_RANGE);
- if (valueType=='int' && generateDataTypeMsg == false)
- window.alert(MSG_MAX_INT_01);
- else
- window.alert(MSG_MAX_FLOAT_01);
- setFocus(eFocus);
-
- return false;
- }
- else if (maxExc != null && (e.value >= maxExc || !validValue))
- {
- var MSG_MAX_INT_02 = "<xts:string id="IDS_ERR_MAX_INT_02" encode="javascript"><xts:param name="max">" + maxExc + "</xts:param></xts:string>";
- var MSG_MAX_FLOAT_02 = "<xts:string id="IDS_ERR_MAX_FLOAT_02" encode="javascript"><xts:param name="max">" + maxExc + "</xts:param></xts:string>";
- if (valueType=='int')
- window.alert(MSG_MAX_INT_02);
- else
- window.alert(MSG_MAX_FLOAT_02);
- setFocus(eFocus);
-
- return false;
- }
- }
- <!-- Check to make sure that the value is between min and max -->
- function validate_max_range(e, type, guiType, eFocus)
- {
- if (guiType == 'nilInt' && e.value == '')
- {
- return true;
- }
- var valueType;
- if (type == 'nonNegativeIntegerProp' || type == 'positiveIntegerProp' || type == 'intProp')
- valueType = 'int';
- else
- valueType = 'float';
- var validValue = true;
- if (valueType == 'int' && ( isNaN(e.value) || parseInt(e.value, 10) != e.value))
- validValue = false;
- else if (valueType == 'float' && (isNaN(e.value) || parseFloat(e.value) != e.value))
- validValue = false;
-
- <!-- if no max values are supplied for int types, then hardcode to max java int value -->
- var generateDataTypeMsg = false;
- var maxInc = 0;
- if (valueType == 'int')
- {
- var max = '<xsl:value-of select="key('system-param', 'integerMaximumValue')"/>';
- maxInc = max - 0 ; //Default value such as 2147483647;
- generateDataTypeMsg = true;
- }
- var MSG_DATATYPE_OUT_OF_RANGE = "<xts:string id="IDS_ERR_MAX_INT_01" encode="javascript"><xts:param name="max">" + maxInc + "</xts:param></xts:string>";
- if (maxInc != null && e.value > maxInc)
- {
- if (valueType=='int') {
- window.alert(MSG_DATATYPE_OUT_OF_RANGE);
- setFocus(eFocus);
- return false;
- }
-
- }
- }
- <!-- Checks all the length constraints and displays an appropriate error message -->
- function validate_length(e, length, minLength, maxLength, eFocus)
- {
- if (length != '' && e.value.length != length)
- {
- var MSG_LENGTH = "<xts:string id="IDS_ERR_LENGTH" encode="javascript"><xts:param name="length">" + length + "</xts:param></xts:string>";
- window.alert(MSG_LENGTH);
- setFocus(eFocus);
- return false;
- }
- if ((minLength != '' && maxLength != '') && (e.value.length < minLength || e.value.length > maxLength))
- {
- var msgMaxLength = 1 + parseInt(maxLength);
- var MSG_MIN_MAX_LENGTH = "<xts:string id="IDS_ERR_MIN_MAX_LENGTH" encode="javascript"><xts:param name="minLength">" + minLength-1 + "</xts:param><xts:param name="maxLength">" + msgMaxLength + "</xts:param></xts:string>";
- window.alert(MSG_MIN_MAX_LENGTH);
- setFocus(eFocus);
- return false;
- }
- else if (minLength != '' && e.value.length < minLength)
- {
- var MSG_MIN_LENGTH = "<xts:string id="IDS_ERR_MIN_LENGTH" encode="javascript"><xts:param name="minLength">" + minLength-1 + "</xts:param></xts:string>";
- window.alert(MSG_MIN_LENGTH);
- setFocus(eFocus);
- return false;
- }
- else if (maxLength != '' && e.value.length > maxLength)
- {
- var msgMaxLength = maxLength;
- var MSG_MAX_LENGTH = "<xts:string id="IDS_ERR_MAX_LENGTH" encode="javascript"><xts:param name="maxLength">" + msgMaxLength + "</xts:param></xts:string>";
- window.alert(MSG_MAX_LENGTH);
- setFocus(eFocus);
- return false;
- }
- }
- <!-- Make sure the value is a positive integer (1,2,...) -->
- function validate_positiveIntegerProp(e, eFocus)
- {
- if (e.value < 1 || isNaN(e.value) || parseInt(e.value, 10) != e.value)
- {
- window.alert("<xts:string id="IDS_ERR_POSITIVE" encode="javascript"/>");
- eFocus.focus();
- return false;
- }
-
- e.value = parseInt(e.value, 10);
- }
- <!-- Make sure the value is a nonnegative integer (0,1,2,...) -->
- function validate_nonNegativeIntegerProp(e, eFocus)
- {
- if (e.value < 0 || isNaN(e.value) || parseInt(e.value, 10) != e.value)
- {
- window.alert("<xts:string id="IDS_ERR_NON_NEGATIVE" encode="javascript"/>");
- eFocus.focus();
- return false;
- }
-
- e.value = parseInt(e.value, 10);
- }
- <!-- Make sure the value is a valid int -->
- function validate_intProp(e, eFocus)
- {
- if ( isNaN(e.value) || parseInt(e.value, 10) != e.value)
- {
- window.alert("<xts:string id="IDS_ERR_INT" encode="javascript"/>");
- eFocus.focus();
- return false;
- }
-
- e.value = parseInt(e.value, 10);
- }
- <!-- Make sure the value is a valid duration -->
- function validate_durationProp(e, eFocus)
- {
- return validate_intProp(e, eFocus); //same rules as int
- }
- <!-- Make sure the value is a valid float -->
- function validate_floatProp(e, eFocus)
- {
- if (isNaN(e.value) || parseFloat(e.value) != e.value)
- {
- window.alert("<xts:string id="IDS_ERR_FLOAT" encode="javascript"/>");
- setFocus(eFocus);
- return false;
- }
- e.value = parseFloat(e.value);
- }
- <!-- Do a few fundamental validation checks on the URI
- Note that it may be relative or absolute; IPv4 or IPv6 -->
- function validate_anyURIProp(e, eFocus)
- {
- var uri = new String(e.value);
- var ERR_MSG = "<xts:string id="IDS_ERR_URI" encode="javascript"/>";
- <!-- No spaces -->
- if (uri.search(/ /) == 1) {
- window.alert(ERR_MSG);
- setFocus(eFocus);
- return false;
- }
-
- <!-- Anything after the protocol should be non-empty -->
- var idx = uri.search("://");
- if (idx != -1) {
- if (uri.substring(idx+3).length == 0) {
- window.alert(ERR_MSG);
- setFocus(eFocus);
- return false;
- }
- }
- }
- <!-- Make sure the value is a valid nmtoken, i.e. there are no space in the string. -->
- function validate_nmtokenProp(e, eFocus)
- {
- var nm = new String(e.value);
- <!-- Make sure there are no space -->
- if (nm.search(/ /) != -1)
- {
- window.alert("<xts:string id="IDS_ERR_NMTOKEN" encode="javascript"/>");
- setFocus(eFocus);
- return false;
- }
- }
- </script>
- <dc:confirm-cancel/>
- </dp:script>
- <xsl:variable name="the-object" select="cm:queryResponse/cm:queryReply[1]/*[position()=1]"/>
- <xsl:variable name="the-objectClass" select="$the-object/cm:objectClass"/>
-
- <xsl:variable name="has_write_permission" select="contains(concat(' ', $the-object/cm:permissions, ' '), ' write ')"/>
- <xsl:variable name="has_policy_permission" select="contains(concat(' ', $the-object/cm:permissions, ' '), ' setPolicy ')"/>
- <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
- <xsl:variable name="is_root_config" select="local-name($the-object)='configuration'"/>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="$has_write_permission = true()">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <utml:exclusion-list>
- <xsl:variable name="start-line">
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_section')!=''">
- <xsl:value-of select="key('env-param', 'm_section')"/>
- </xsl:when>
- <xsl:when test="key('env-param','m_pagerfrom')!=''">
- <xsl:value-of select="key('env-param','m_pagerfrom')"/>
- </xsl:when>
- <xsl:otherwise>1</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="end-line">
- <xsl:choose>
- <xsl:when test="key('env-param','m_pagerto')!=''">
- <xsl:value-of select="key('env-param','m_pagerto')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$start-line + key('session-param', 'linesPerPage') - 1"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:for-each select="/root/cm:queryResponse/cm:queryReply[1]/node()/*[not(local-name()='permissions') and not(local-name()='objectClass') and (@category=$filter or '_all_'=$filter)][position()>=$start-line and position()<=$end-line]">
- <xsl:variable name="acquire">
- <xsl:choose>
- <xsl:when test="@acquired = 'true'">a</xsl:when>
- <xsl:otherwise>n</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="concat('editField_m_pc_', $acquire, '_', local-name(), ' ')"/>
- <xsl:value-of select="concat('changed_editField_m_pc_', $acquire, '_', local-name(), ' ')"/>
- <xsl:value-of select="concat('m_pc_', $acquire, '_', local-name(), ' ')"/>
- <xsl:value-of select="concat('checkbox_', $start-line + position() - 1, ' ')"/>
- <xsl:value-of select="concat('changed_m_pc_', $acquire, '_', local-name(), ' ')"/>
- <xsl:value-of select="concat('changed_dura_property_a_', local-name(), ' ')"/>
- <xsl:value-of select="concat('changed_dura_property_n_', local-name(), ' ')"/>
- <xsl:if test="substring-after(@type,':')='durationProp'">
- <xsl:value-of select="concat('dura_property_a_',local-name(), ' ')"/>
- <xsl:value-of select="concat('dura_property_n_',local-name(), ' ')"/>
- <xsl:value-of select="concat('durationSelect_', local-name(), ' ')"/>
- <xsl:value-of select="concat('changed_durationSelect_', local-name(), ' ')"/>
- <xsl:value-of select="concat('m_pc_a_', local-name(), ' ')"/>
- <xsl:value-of select="concat('m_pc_n_', local-name(), ' ')"/>
- </xsl:if>
- <xsl:if test="substring-after(@type,':')='floatProp'">
- <xsl:value-of select="concat('_FLOATDISPLAY_m_pc_', $acquire, '_', local-name(), ' ')"/>
- <xsl:value-of select="concat('checkbox__FLOATDISPLAY_', $start-line + position() - 1, ' ')"/>
- <xsl:value-of select="concat('changed__FLOATDISPLAY_m_pc_', $acquire, '_', local-name(), ' ')"/>
- </xsl:if>
- </xsl:for-each>
- </utml:exclusion-list>
- <utml:input type="hidden" name="m_name" utml:update="false">
- <utml:value>
- <xsl:value-of select="/root/cm:queryResponse/cm:queryReply[position()=last()]/*/cm:defaultName"/>
- </utml:value>
- </utml:input>
- <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
- <utml:input type="hidden" name="listop" value="" utml:update="false"/>
- <utml:input type="hidden" name="m_s_set" utml:update="false">
- <utml:value>
- <xsl:value-of select="/root/session/param[@name='s_set']"/>
- </utml:value>
- </utml:input>
- <!-- Render the dialog contents -->
- <dp:header useBackURL="not($showOKCancel)" div="div">
- <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
- </dp:header>
- <df:propertiesTabs select="settings">
- <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
- </df:propertiesTabs>
- <dp:description><xts:string id="IDS_PROP_SETTINGS_INTRO"/></dp:description>
- <!-- Dialog Body -->
- <lyt:layout style="1">
- <lyt:section>
- <dp:input>
- <dp:section1>
- <label for="ctrl_s_filter"><xts:string id="IDS_PROP_SETTINGS_LABEL_FILTER_ON"/></label>
- </dp:section1>
- <dp:section2>
- <script language="javascript">
- function doFilter()
- {
- var form = document.pform;
- if (form == null)
- return;
-
- form.m.value = "portal/<xsl:value-of select="$mname"/>";
- form.m_section.value = "1";
- form.m_pagerto.value="<xsl:value-of select="xtsext:javascriptencode(key('session-param', 'linesPerPage'))"/>";
- form.m_pagerfrom.value="1";
- form.submit();
- }
- </script>
-
- <!-- get the list of uniqueCategories -->
- <xsl:variable name="uniqueCategories" select="/root/cm:queryResponse/cm:queryReply/*/*[generate-id(.) = generate-id(key('valid-categories',@category)) and local-name()!='permissions']/@category"/>
-
- <utml:select size="1" name="s_filter" utml:default-value="_all_" onClick="javascript:validate();" onchange="javascript:doFilter();" id="ctrl_s_filter">
- <utml:option value="_all_">
- <xts:string id="IDS_PROP_SETTINGS_CATEGORY_ALL"/>
- </utml:option>
- <xsl:for-each select="$uniqueCategories">
- <xsl:sort select="." lang="$productLocale"/>
- <utml:option>
- <utml:value>
- <xsl:value-of select="."/>
- </utml:value>
- <xsl:value-of select="key('category-labels',.)/@label"/>
- </utml:option>
- </xsl:for-each>
- </utml:select>
- </dp:section2>
- </dp:input>
- </lyt:section>
- <lyt:section>
- <script language="javascript">
- function doSort(column)
- {
- var form = document.pform;
- if (form == null)
- return;
-
- e = form.m_s_set;
- if (column == 'c')
- {
- if (e.value == 'ca')
- e.value = 'cd';
- else
- if (e.value == 'cd')
- e.value = '';
- else
- e.value = 'ca';
- }
- else
- {
- if (e.value == 'na')
- e.value = 'nd';
- else
- if (e.value == 'nd')
- e.value = '';
- else
- e.value = 'na';
- }
-
- form.submit();
- }
- function doEditAdvancedSettings()
- {
- if (validate())
- {
- var form = document.pform;
- form.ps_nav_op.value="stack-up";
- form.m.value="<xsl:value-of select="$app"/>/settings_advanced.xts";
- form.submit();
- }
- else
- return false;
- }
- function doEditGatewayMappings()
- {
- if (validate())
- {
- var form = document.pform;
- form.ps_nav_op.value="stack-up";
- form.m.value="<xsl:value-of select="$app"/>/settings_gateway_mappings.xts";
- form.submit();
- }
- else
- return false;
- }
- function doEdit(actionTarget){
- if (validate()){
- var form = document.pform;
- form.ps_nav_op.value="stack-up";
- form.m.value="<xsl:value-of select="$app"/>/" + actionTarget + ".xts";
- form.submit();
- } else {
- return false;
- }
- }
-
- function updateHiddenField(obj)
- {
- var form = document.pform;
- var hiddenName = 'm_pc_' + obj.name;
- document.all[hiddenName].value = obj.checked;
-
- var changedHiddenName = 'changed_m_pc_' + obj.name;
- document.all[changedHiddenName].value = obj.checked;
- }
-
- function populateHiddenField(form,name, value) {
- var input = form[name];
- if (!input) {
- input = document.createElement("INPUT");
- input.setAttribute("type","hidden");
- input.setAttribute("name",name);
- form.appendChild(input);
- }
- input.setAttribute("value",value);
- }
- function doEditBooleanOverrideOptions(type,label)
- {
- if (validate()) {
- var form = document.pform;
- populateHiddenField(form,'m_bool_type',type);
- populateHiddenField(form,'m_bool_label',label);
- form.ps_nav_op.value="stack-up";
- form.m.value="<xsl:value-of select="$app"/>/settings_booleanoverride_options.xts";
- form.submit();
- } else {
- return false;
- }
- }
-
- function deleteInputs(inputName) {
- var inputs = document.getElementsByName(inputName);
- while (inputs.length>0) {
- var input = inputs[inputs.length-1];
- input.parentNode.removeChild(input);
- }
- }
-
- function handleFlashCharts(obj) {
- var inputs = ['m_opt_bool_flashCharts','overrideOptions_flashCharts','serviceDefaultOptions_flashCharts'];
- for (var i=0;i < inputs.length;i++) {
- obj.checked ? deleteInputs(inputs[i]) : populateHiddenField(document.pform,inputs[i],obj.checked);
- }
- var resetField = 'resetroot_optionArrayProp_flashCharts';
- obj.checked ? populateHiddenField(document.pform,resetField,obj.checked) : deleteInputs(resetField);
- }
- </script>
- <script language="javascript" src="{$webcontent}/{$app}/js/list.js"/>
- <script language="javascript" src="{$webcontent}/{$app}/js/dynDropDown.js"/>
- <script language="javascript">
-
- function verifyChangedValue(obj, valid)
- {
- if (obj) {
- if (obj.value == '')
- {
- setHiddenValue('');
- }
- else if (obj.value == '<xts:string id="IDS_PROP_NUMBER_ITEM" encode="javascript"/>')
- {
- obj.value = getHiddenValue();
- }
- <!--Update the hidden utml that the value has changed.-->
- updateChanged();
-
- if (obj.value != '<xts:string id="IDS_PROP_UNLIMITED_ITEM" encode="javascript"/>')
- {
- obj.readOnly = false;
- }
- if (obj.value == '<xts:string id="IDS_PROP_UNLIMITED_ITEM" encode="javascript"/>')
- {
- //If the new selection is Unlimited then make it read only.
- onBlurEvent(obj);
- }
- }
- }
- function onBlurEvent(obj)
- {
- if (obj)
- {
- if (obj.value == '' || obj.value == '<xts:string id="IDS_PROP_UNLIMITED_ITEM" encode="javascript"/>') {
- setHiddenValue('');
- obj.value = '<xts:string id="IDS_PROP_UNLIMITED_ITEM" encode="javascript"/>';
- obj.readOnly = true;
- } else
- {
- //Update the array for the entry "Number" since it can change.
- //The unlimited value never changes: it is always empty value.
- updateTheArray(1, obj.value);
- }
- }
- }
- </script>
- <cf:main-pager-section form="pform" validate="true">
- <cf:param name="target">concat($app,'/',$mname)</cf:param>
- <cf:param name="item-path">/root/cm:queryResponse/cm:queryReply[1]/node()/*[not(local-name()='permissions') and not(local-name()='objectClass') and (@category=$filter or '_all_'=$filter)]</cf:param>
- <cf:param name="lines-per-page">
- <xsl:value-of select="key('session-param', 'linesPerPage')"/>
- </cf:param>
- <cf:param name="rows">
- <!-- First define the columns -->
- <cp:tableHeader session-name="s_set">
- <cp:columnHeader toggleName="checkbox_" noLabel="true"/>
- <cp:columnHeader/>
- <cp:columnHeader sort="c" id="col_category">
- <cp:sortHref>javascript:doSort('c')</cp:sortHref>
- <xts:string id="IDS_PROP_SETTINGS_HEADING_CATEGORY"/>
- </cp:columnHeader>
- <cp:columnHeader width="100%" sort="n" id="col_name">
- <cp:sortHref>javascript:doSort('n')</cp:sortHref>
- <xts:string id="IDS_PROP_SETTINGS_HEADING_NAME"/>
- </cp:columnHeader>
- <cp:columnHeader>
- <xts:string id="IDS_PROP_SETTINGS_HEADING_VALUE"/>
- </cp:columnHeader>
- <cp:columnHeader>
- <xsl:choose>
- <xsl:when test="$is_root_config=true()">
- <xts:string id="IDS_PROP_SETTINGS_HEADING_DEFAULT"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SETTINGS_HEADING_ACQUIRED"/>
- </xsl:otherwise>
- </xsl:choose>
- </cp:columnHeader>
- </cp:tableHeader>
- <!-- Then define the column contents -->
- <cp:tableContent>
- <xsl:variable name="entryLabel">
- <xsl:choose>
- <xsl:when test="@label!=''">
- <xsl:value-of select="@label"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="local-name()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <cp:columnContent>
- <utml:input type="checkbox">
- <xsl:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM" encode="html"><xts:param name="pagerItemName"><xsl:value-of select="$entryLabel"/></xts:param></xts:string></xsl:attribute>
- <utml:value>
- <xsl:value-of select="name(.)"/>
- </utml:value>
- <utml:name>
- <xsl:value-of select="concat('checkbox_', $cf__startLine + position() - 1)"/>
- </utml:name>
- </utml:input>
- </cp:columnContent>
- <cp:columnContent>
- <img width="16" height="16">
- <xsl:attribute name="alt"><xts:string id="IDS_PROP_SETTINGS_PARAMETER" encode="html"/></xsl:attribute>
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root, 'icon_parameter.gif')"/></xsl:attribute>
- </img>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:variable name="group" select="@group"/>
- <xsl:choose>
- <xsl:when test="$group!=''">
- <xsl:value-of select="$group"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SETTINGS_CATEGORY_NO_CATEGORY"/>
- </xsl:otherwise>
- </xsl:choose>
- </cp:columnContent>
- <xsl:variable name="this">
- <xsl:choose>
- <xsl:when test="@acquired = 'true'"><xsl:value-of select="concat('a_', local-name())"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="concat('n_', local-name())"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="controlName" select="concat('m_pc_', $this)"/>
- <cp:columnContent>
- <span id="lbl_{$controlName}"><xsl:value-of select="$entryLabel"/></span>
- </cp:columnContent>
- <xsl:variable name="test-reset">
- <xsl:choose>
- <xsl:when test="$the-objectClass = 'configuration'">
- <xsl:value-of select="concat('resetroot_', local-name())"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('reset_', local-name())"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="this-pn">
- <xsl:value-of select="local-name()"/>
- </xsl:variable>
- <cp:columnContent>
- <xsl:choose>
- <!-- we must catch the enums first since the type doesn't change when there are enums -->
- <xsl:when test="*[local-name()='enum']">
- <xsl:variable name="defaultSelection">
- <xsl:choose>
- <xsl:when test="key('env-param', $test-reset)">
- <xsl:choose>
- <xsl:when test="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn] and not(/root/parent/cm:queryResponse/cm:queryReply[1]/node()/*[local-name()=$this-pn]/@nil)">
- <xsl:value-of select="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="key('env-param', $controlName)">
- <xsl:value-of select="key('env-param', $controlName)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <!-- If it's read only then let's get the value first from the query -->
- <xsl:when test="@modifiable='false' and *[local-name()='value']">
- <xsl:value-of select="*[local-name()='value']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <utml:select utml:track="true" utml:update="false" aria-labelledby="lbl_{$controlName}">
- <utml:default-value><xsl:value-of select="$defaultSelection"/></utml:default-value>
- <utml:name>
- <xsl:value-of select="$controlName"/>
- </utml:name>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="@modifiable='false'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <xsl:for-each select="*[local-name()='enum']">
- <xsl:variable name="enumValue">
- <xsl:choose>
- <xsl:when test="@ns != ''">
- <xsl:value-of select="xtsext:javascriptencode(concat(@ns,@value))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:javascriptencode(@value)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <utml:option>
- <utml:value><xsl:value-of select="$enumValue"/></utml:value>
- <xsl:if test="$defaultSelection = $enumValue">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xsl:value-of select="@label"/>
- </utml:option>
- </xsl:for-each>
- </utml:select>
- </xsl:when>
-
- <xsl:when test="@guiType='nilInt'">
- <xsl:variable name="toolTip">
- <xsl:call-template name="toolTip"/>
- </xsl:variable>
- <xsl:variable name="valueName">
- <xsl:choose>
- <xsl:when test="key('env-param', $test-reset)">
- <xsl:choose>
- <xsl:when test="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn] and (/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn] != '') and not(/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]/@nil)">
- <xsl:value-of select="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="@default != ''">
- <xsl:value-of select="@default"/>
- </xsl:when>
- <xsl:otherwise><xts:string id="IDS_PROP_UNLIMITED_ITEM" encode="javascript"/></xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = concat('m_pc_', $this)] and (/root/env/param[@name = concat('m_pc_', $this)] != '')">
- <xsl:value-of select="/root/env/param[@name = concat('m_pc_', $this)]"/>
- </xsl:when>
- <xsl:when test=". != ''">
- <xsl:value-of select="."/>
- </xsl:when>
- <xsl:otherwise><xts:string id="IDS_PROP_UNLIMITED_ITEM" encode="javascript"/></xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="valueVal">
- <xsl:choose>
- <xsl:when test="key('env-param', $test-reset)">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = concat('m_pc_', $this)]">
- <xsl:value-of select="/root/env/param[@name = concat('m_pc_', $this)]"/>
- </xsl:when>
- <xsl:when test="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn] and not(/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]/@nil)">
- <xsl:value-of select="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = concat('m_pc_', $this)]">
- <xsl:value-of select="/root/env/param[@name = concat('m_pc_', $this)]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="readonly">
- <xsl:choose>
- <xsl:when test="$valueVal = ''">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <script>
- var valueArray_<xsl:value-of select="$this"/> = new Array();
- var val = '<xsl:value-of select="xtsext:javascriptencode(string($valueVal))"/>';
- if (val == '')
- {
- val = '0';
- }
- valueArray_<xsl:value-of select="$this"/>[0] = new Array("<xts:string id="IDS_PROP_UNLIMITED_ITEM" encode="javascript"/>", "");
- valueArray_<xsl:value-of select="$this"/>[1] = new Array("<xts:string id="IDS_PROP_NUMBER_ITEM" encode="javascript"/>", val);
-
- </script>
- <xsl:choose>
- <xsl:when test="key('env-param', $test-reset)">
- <cf:dynamicDropDown name="concat('m_pc_', $this)" width="96" filterList="false"
- selectedValue="$valueVal" selectedName="$valueName" array="concat('valueArray_', $this)"
- validate="verifyChangedValue" form="pform" tooltipID="IDS_PROP_UNLIMITED_NUMBER_TIP"
- useUtml="true" update="false" onblur="onBlurEvent" readonly="concat('',$readonly)" track="true" title="$toolTip" aria-labelledby="concat('lbl_',$controlName)" modifiable="@modifiable"/>
- </xsl:when>
- <xsl:otherwise>
- <cf:dynamicDropDown name="concat('m_pc_', $this)" width="96" filterList="false"
- selectedValue="$valueVal" selectedName="$valueName" array="concat('valueArray_', $this)"
- validate="verifyChangedValue" form="pform" tooltipID="IDS_PROP_UNLIMITED_NUMBER_TIP"
- useUtml="true" title="$toolTip" onblur="onBlurEvent" readonly="concat('',$readonly)" track="true" aria-labelledby="concat('lbl_',$controlName)" modifiable="@modifiable"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="@type='cm:positiveIntegerProp' or @type='cm:nonNegativeIntegerProp' or @type='cm:intProp' ">
- <xsl:variable name="toolTip">
- <xsl:call-template name="toolTip"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="key('env-param', $test-reset)">
- <utml:input type="text" size="10" utml:track="true" utml:update="false" aria-labelledby="lbl_{$controlName}">
- <xsl:if test="normalize-space($toolTip) != ''">
- <xsl:attribute name="title"><xsl:value-of select="normalize-space($toolTip)"/></xsl:attribute>
- </xsl:if>
- <utml:name>
- <xsl:value-of select="concat('m_pc_', $this)"/>
- </utml:name>
- <utml:value>
- <xsl:choose>
- <xsl:when test="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn] and not(/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]/@nil)">
- <xsl:value-of select="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </utml:value>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="@modifiable='false'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- </utml:input>
- </xsl:when>
- <xsl:otherwise>
- <utml:input type="text" size="10" utml:track="true" aria-labelledby="lbl_{$controlName}">
- <xsl:if test="normalize-space($toolTip) != ''">
- <xsl:attribute name="title"><xsl:value-of select="normalize-space($toolTip)"/></xsl:attribute>
- </xsl:if>
- <utml:name>
- <xsl:value-of select="concat('m_pc_', $this)"/>
- </utml:name>
- <utml:value>
- <xsl:value-of select="."/>
- </utml:value>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="@modifiable='false'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- </utml:input>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
-
- <xsl:when test="@type='cm:floatProp'">
- <xsl:variable name="toolTip">
- <xsl:call-template name="toolTip"/>
- </xsl:variable>
- <xsl:variable name="floatParamName" select="concat('m_pc_', $this)"/>
- <xsl:variable name="floatParamValue">
- <xsl:choose>
- <xsl:when test="key('env-param', $test-reset)">
- <xsl:choose>
- <xsl:when test="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn] and not(/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]/@nil)">
- <xsl:value-of select="string(/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn])"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="string(@default)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="key('env-param',$floatParamName) and key('env-param',$floatParamName) != ''">
- <xsl:value-of select="string(key('env-param',$floatParamName))"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="string(.)"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:call-template name="localizedFloatTextBox">
- <xsl:with-param name="ariaLabelledBy" select="concat('lbl_',$controlName)"/>
- <xsl:with-param name="eName" select="$floatParamName"/>
- <xsl:with-param name="eValue" select="$floatParamValue"/>
- <xsl:with-param name="toolTip" select="$toolTip"/>
- <xsl:with-param name="readOnly">
- <xsl:choose>
- <xsl:when test="@modifiable='false'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="
- @type='cm:stringProp' or
- @type='cm:nmtokenProp' or
- @type='cm:anyURIProp'">
- <xsl:choose>
- <xsl:when test="key('env-param', $test-reset)">
- <utml:input type="text" size="20" utml:track="true" utml:update="false" aria-labelledby="lbl_{$controlName}">
- <xsl:if test="@maxlength">
- <xsl:attribute name="maxlength">
- <xsl:value-of select="@maxlength"/>
- </xsl:attribute>
- </xsl:if>
- <utml:name>
- <xsl:value-of select="concat('m_pc_', $this)"/>
- </utml:name>
- <utml:value>
- <xsl:choose>
- <xsl:when test="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn] and not(/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]/@nil)">
- <xsl:value-of select="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]"/>
- </xsl:when>
- <!-- display default value -->
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </utml:value>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="@modifiable='false'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- </utml:input>
- </xsl:when>
- <xsl:otherwise>
- <utml:input type="text" size="20" utml:track="true" aria-labelledby="lbl_{$controlName}">
- <xsl:if test="@maxlength">
- <xsl:attribute name="maxlength">
- <xsl:value-of select="@maxlength"/>
- </xsl:attribute>
- </xsl:if>
- <utml:name>
- <xsl:value-of select="concat('m_pc_', $this)"/>
- </utml:name>
- <utml:value>
- <xsl:value-of select="."/>
- </utml:value>
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="@modifiable='false'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- </utml:input>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="@type='cm:booleanProp'">
- <xsl:variable name="defaultSelection">
- <xsl:choose>
- <xsl:when test="key('env-param', $test-reset)">
- <xsl:choose>
- <xsl:when test="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn] and not(/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]/@nil)">
- <xsl:value-of select="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="key('env-param', $controlName)">
- <xsl:value-of select="key('env-param', $controlName)"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="@default"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- need the styles on the checkbox to make it align with the other controls -->
- <utml:input type="checkbox" utml:update="false" utml:track="true" onclick="updateHiddenField(this);" style="text-indent: -4px; margin-left:0;" aria-labelledby="lbl_{$controlName}">
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="@modifiable='false'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <utml:name><xsl:value-of select="$this"/></utml:name>
- <xsl:if test="$defaultSelection = 'true'">
- <xsl:attribute name="checked">checked</xsl:attribute>
- </xsl:if>
- </utml:input>
- <utml:input type="hidden" utml:update="false">
- <utml:name><xsl:value-of select="$controlName"/></utml:name>
- <utml:value><xsl:value-of select="$defaultSelection"/></utml:value>
- </utml:input>
- <utml:input type="hidden" utml:update="false">
- <utml:name><xsl:value-of select="concat('changed_', $controlName)"/></utml:name>
- <utml:value>0</utml:value>
- </utml:input>
- </xsl:when>
- <xsl:when test="local-name() = 'advancedSettings' and @type='cm:anyTypeProp'">
- <a href="#" onclick="javascript:doEditAdvancedSettings();">
- <xsl:attribute name="aria-label"><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED_ARIA"><xts:param name="propertyName"><xsl:value-of select="$entryLabel"/></xts:param></xts:string></xsl:attribute>
- <xsl:text><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED"/></xsl:text>
- </a>
- </xsl:when>
- <xsl:when test="local-name() = 'rdsGatewayMappings' and @type='cm:gatewayMappingArrayProp'">
- <a href="#" onclick="javascript:doEditGatewayMappings();">
- <xsl:attribute name="aria-label"><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED_ARIA"><xts:param name="propertyName"><xsl:value-of select="$entryLabel"/></xts:param></xts:string></xsl:attribute>
- <xsl:text><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED"/></xsl:text>
- </a>
- </xsl:when>
- <xsl:when test="local-name() = 'qsROLAPCubeConfigurations' and @type='cm:baseROLAPCubeConfigurationArrayProp'">
- <a href="#" onclick="javascript:doEdit('settings_rolapcube_configurations');">
- <xsl:attribute name="aria-label"><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED_ARIA"><xts:param name="propertyName"><xsl:value-of select="$entryLabel"/></xts:param></xts:string></xsl:attribute>
- <xsl:text><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED"/></xsl:text>
- </a>
- </xsl:when>
- <xsl:when test="local-name() = 'jmxProxyHostDispatchers' and @type='cm:baseClassArrayProp'">
- <a href="#" onclick="javascript:doEdit('settings_jmxProxyHostDispatchers');">
- <xsl:attribute name="aria-label"><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED_ARIA"><xts:param name="propertyName"><xsl:value-of select="$entryLabel"/></xts:param></xts:string></xsl:attribute>
- <xsl:text><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED"/></xsl:text>
- </a>
- </xsl:when>
- <xsl:when test="@type='cm:durationProp'">
- <xsl:variable name="toolTip">
- <xsl:call-template name="toolTip"/>
- </xsl:variable>
- <!-- Need to define this variable in order to be able to use the concat in the name condition -->
- <xsl:variable name="localName" ><xsl:value-of select="local-name()"/></xsl:variable>
- <xsl:variable name="previousDuraPropertyName">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name=concat('dura_property_a_',$localName)]">
- <xsl:value-of select="concat('dura_property_a_',local-name())"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name=concat('dura_property_n_',$localName)]">
- <xsl:value-of select="concat('dura_property_n_',local-name())"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('dura_property_',$this)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="duraPropertyName" select="concat('dura_property_',$this)"/>
- <xsl:variable name="changedDuraPropertyName" select="concat('changed_dura_property_',$this)"/>
- <xsl:variable name="duraSelectPropertyName" select="concat('durationSelect_', local-name())"/>
- <xsl:variable name="changedDuraSelectPropertyName" select="concat('changed_',$duraSelectPropertyName)"/>
-
- <xsl:variable name="secondsDisplay"><xts:string id="IDS_PROP_SETTINGS_UNITS_SEC"/></xsl:variable>
- <xsl:variable name="minutesDisplay"><xts:string id="IDS_PROP_SETTINGS_UNITS_MIN"/></xsl:variable>
- <xsl:variable name="hoursDisplay"><xts:string id="IDS_PROP_SETTINGS_UNITS_HOUR"/></xsl:variable>
- <xsl:variable name="daysDisplay"><xts:string id="IDS_PROP_DAYS"/></xsl:variable>
- <xsl:variable name="monthsDisplay"><xts:string id="IDS_PROP_MONTHS"/></xsl:variable>
- <xsl:variable name="duration">
- <xsl:choose>
- <xsl:when test="key('env-param', $test-reset)">
- <xsl:choose>
- <xsl:when test="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn] and not(/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]/@nil)">
- <xsl:value-of select="/root/parent/cm:queryResponse/node()/*[local-name()=$this-pn]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="/root/env/param[@name=$previousDuraPropertyName] and (/root/env/param[@name=$changedDuraPropertyName]='1' or /root/env/param[@name=$changedDuraSelectPropertyName]='1')">
- <xsl:call-template name="buildDurationValue">
- <xsl:with-param name="durationUnitNbr" select="/root/env/param[@name=$previousDuraPropertyName]"/>
- <xsl:with-param name="durationUnit" select="/root/env/param[@name=$duraSelectPropertyName]"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="parsedDuration">
- <xsl:call-template name="parseDurationValue">
- <xsl:with-param name="duration" select="$duration"/>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:variable name="durationUnitNbr">
- <xsl:value-of select="substring-before($parsedDuration,':')"/>
- </xsl:variable>
- <xsl:variable name="durationUnit">
- <xsl:value-of select="substring-after($parsedDuration,':')"/>
- </xsl:variable>
-
- <dp:group>
- <dp:groupItem>
- <xsl:variable name="unitsLabel"><xts:string id="IDS_PROP_DURATION_UNITS"/></xsl:variable>
- <xts:string id="IDS_PROP_SETTINGS_DURATION"><xts:param name="duraTime">
- <dp:groupItem>
- <utml:input type="text" size="3" maxlength="3" utml:update="false" utml:track="true" aria-labelledby="lbl_{$controlName}">
- <utml:name>
- <xsl:value-of select="$duraPropertyName"/>
- </utml:name>
- <utml:value>
- <xsl:value-of select="$durationUnitNbr"/>
- </utml:value>
- <xsl:if test="normalize-space($toolTip) != ''">
- <xsl:attribute name="title"><xsl:value-of select="normalize-space($toolTip)"/></xsl:attribute>
- </xsl:if>
- </utml:input>
- </dp:groupItem>
- </xts:param>
- <xts:param name="duraSpacer">
- <dp:groupItem><dp:text/></dp:groupItem>
- </xts:param>
- <xts:param name="duraType">
- <dp:groupItem>
- <xsl:variable name="units">
- <xsl:choose>
- <xsl:when test="@units != ''">
- <!--
- An xsd:duration 'units' filter has been defined within MCF for this property so use it.
- A filter can consist of any or all of these 'MDhms' for (M)onths,(D)ays,(h)ours,(m)inutes,(s)econds respectively.
- -->
- <xsl:value-of select="@units"/>
- </xsl:when>
- <xsl:otherwise>
- <!--Use the legacy default-->
- <xsl:value-of select="'MD'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="duraInputName">
- <xsl:value-of select="concat('durationSelect_', local-name())"/>
- </xsl:variable>
- <xsl:variable name="duraOptions">
- <span style="position: absolute;margin-left: -9999px; margin-top: -9999px; " id="lbl_{$duraInputName}"><xsl:value-of select="$unitsLabel"/></span>
- <utml:select utml:update="false" utml:track="true" aria-labelledby="lbl_{$duraInputName}">
- <utml:name>
- <xsl:value-of select="$duraSelectPropertyName"/>
- </utml:name>
- <xsl:if test="contains($units,'s') or $durationUnit='seconds'">
- <utml:option value="seconds">
- <xsl:if test="$durationUnit='seconds'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$secondsDisplay"/>
- </utml:option>
- </xsl:if>
- <xsl:if test="contains($units,'m') or $durationUnit='minutes'">
- <utml:option value="minutes">
- <xsl:if test="$durationUnit='minutes'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$minutesDisplay"/>
- </utml:option>
- </xsl:if>
- <xsl:if test="contains($units,'h') or $durationUnit='hours'">
- <utml:option value="hours">
- <xsl:if test="$durationUnit='hours'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$hoursDisplay"/>
- </utml:option>
- </xsl:if>
- <xsl:if test="contains($units,'D') or $durationUnit='days'">
- <utml:option value="days">
- <xsl:if test="$durationUnit='days'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$daysDisplay"/>
- </utml:option>
- </xsl:if>
- <xsl:if test="contains($units,'M') or $durationUnit='months'">
- <utml:option value="months">
- <xsl:if test="$durationUnit='months'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$monthsDisplay"/>
- </utml:option>
- </xsl:if>
- </utml:select>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="count($duraOptions/select/option) = 1">
- <!-- There's only one item in the list. Just display a label and create a hidden field for the actual units -->
- <utml:input type="hidden">
- <utml:name>
- <xsl:value-of select="$duraInputName"/>
- </utml:name>
- <utml:value>
- <xsl:value-of select="$duraOptions/select/option/@value"/>
- </utml:value>
- </utml:input>
- <xsl:value-of select="$duraOptions/select/option"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="$duraOptions"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:groupItem>
- </xts:param>
- </xts:string>
- </dp:groupItem>
- </dp:group>
- </xsl:when>
-
- <xsl:when test="substring-after(@type,':') = 'optionArrayProp'">
- <xsl:variable name="enumValue" select="substring-after(@value,'#')"/>
- <xsl:choose>
- <xsl:when test="$enumValue = 'flashCharts'">
- <!-- flashCharts overrideOptions will use simple inline checkbox editor -->
- <utml:input type="checkbox" utml:update="false" utml:track="true" onclick="handleFlashCharts(this)" style="text-indent: -4px; margin-left:0;">
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="@modifiable='false'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <xsl:if test="count(/root/env/param[starts-with(@name,concat('resetroot_optionArrayProp_',$enumValue))])>0 or (count(/root/env/param[starts-with(@name,concat('overrideOptions_',$enumValue))])=0 and not(/root/env/param[starts-with(@name,concat('serviceDefaultOptions_',$enumValue))]))">
- <xsl:attribute name="checked">checked</xsl:attribute>
- </xsl:if>
- </utml:input>
- </xsl:when>
- <xsl:otherwise>
- <!-- Accessibility and any other overrideOptions else will use a separate boolean dialog editor -->
- <xsl:variable name="editFunc">
- javascript:doEditBooleanOverrideOptions('<xsl:value-of select="xtsext:javascriptencode(substring-after(@value,'#'))"/>','<xsl:value-of select="xtsext:javascriptencode(@label)"/>')
- </xsl:variable>
- <a href="#" onclick="{$editFunc}">
- <xsl:attribute name="aria-label"><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED_ARIA"><xts:param name="propertyName"><xsl:value-of select="$entryLabel"/></xts:param></xts:string></xsl:attribute>
- <xsl:text><xts:string id="IDS_PROP_SETTINGS_EDIT_ADVANCED"/></xsl:text>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SETTINGS_NOT_SUPPORTED">
- <xts:param name="type">
- <xsl:value-of select="@type"/>
- </xts:param>
- </xts:string>
- </xsl:otherwise>
- </xsl:choose>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:choose>
- <xsl:when test="$the-objectClass = 'configuration'">
- <xsl:choose>
- <xsl:when test="local-name() = 'advancedSettings'">
- <xsl:choose>
- <xsl:when test=" key('env-param', $test-reset)='1' or not(/root/env/param[starts-with(@name, 'm_pa_')]!='')">
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_YES"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_NO"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="local-name() = 'rdsGatewayMappings'">
- <xsl:choose>
- <xsl:when test=" key('env-param', $test-reset)='1' or not(/root/env/param[starts-with(@name, 'map_')]!='')">
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_YES"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_NO"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="starts-with(local-name(),'optionArrayProp_')">
- <xsl:variable name="enumValue" select="substring-after(@value,'#')"/>
- <xsl:choose>
- <xsl:when test="count(/root/env/param[starts-with(@name,concat('resetroot_optionArrayProp_',$enumValue))])>0 or (count(/root/env/param[starts-with(@name,concat('overrideOptions_',$enumValue))])=0 and not(/root/env/param[starts-with(@name,concat('serviceDefaultOptions_',$enumValue))]))">
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_YES"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_NO"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="key('env-param', $test-reset)='1' or @nil='true' or string() = string(@default) or cm:value = string(@default)">
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_YES"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_NO"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="local-name() = 'advancedSettings' and ((not(key('env-param', $test-reset)) or key('env-param', $test-reset) = '0') and /root/env/param[starts-with(@name, 'm_pa_')])">
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_NO"/>
- </xsl:when>
- <xsl:when test="local-name() = 'rdsGatewayMappings' and ((not(key('env-param', $test-reset)) or key('env-param', $test-reset) = '0') and /root/env/param[starts-with(@name, 'map_')])">
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_NO"/>
- </xsl:when>
- <xsl:when test="local-name() = 'qsROLAPCubeConfigurations'">
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_NO"/>
- </xsl:when>
- <xsl:when test="(@acquired='true' or key('env-param', $test-reset))">
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_YES"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SETTINGS_ACQUIRED_NO"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </cp:columnContent>
- </cp:tableContent>
- </cf:param>
- <cf:param name="actions">
- <cp:action>
- <utml:a utml:validate="true" onclick="javascript:document.pform.listop.value='reset';" utml:hide-when-read-only="true">
- <utml:target>
- <xsl:value-of select="concat($app, '/', $mname)"/>
- </utml:target>
- <xsl:choose>
- <xsl:when test="$is_root_config=true()">
- <xsl:text/><xts:string id="IDS_PROP_SETTINGS_RESET_TO_DEFAULT"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/><xts:string id="IDS_PROP_SETTINGS_RESET_TO_PARENT"/><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </utml:a>
- </cp:action>
- </cf:param>
- </cf:main-pager-section>
- </lyt:section>
- </lyt:layout>
- <xsl:if test="contains(' configuration configurationFolder dispatcher ', concat(' ',$the-objectClass,' ') )">
- <lyt:layout style="1" title="IDS_PROP_SETTINGS_OPTION_SEP" intro="IDS_PROP_SETTINGS_OPTION_DESCRIPTION" border="yes">
- <lyt:section>
- <dp:choice>
- <dp:section1>
- <utml:input type="checkbox" name="settings_delete" utml:track="false" id="ctrl_settings_delete"/>
- </dp:section1>
- <dp:section2 for="ctrl_settings_delete">
- <xts:string id="IDS_PROP_SETTINGS_DELETE_PARAMETER_CHILD"/>
- </dp:section2>
- </dp:choice>
- </lyt:section>
- </lyt:layout>
- </xsl:if>
- <dp:footer div="div">
- <xsl:choose>
- <xsl:when test="$showOKCancel">
- <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" onclick="javascript:document.pform.listop.value='';"/>
- <xsl:choose>
- <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
- <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CLOSE" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
-
- <!-- generate the tooltip for certain runtime parameters -->
- <!-- This code supports minInclusive, minExclusive as well as maxInclusive and maxInclusive. It aslo supports a combination
- of minInclusive and maxInclusive as well as minExclusive and maxExclusive. Currently there is no support for the case
- where exclusive and inclusive values are mixed.
- -->
- <xsl:template name="toolTip">
- <!-- min value -->
- <xsl:variable name="min">
- <xsl:choose>
- <xsl:when test="@minExclusive != ''">
- <xsl:choose>
- <xsl:when test="@type = 'cm:floatProp'">
- <xsl:value-of select="xtsext:formatNumber(string(@minExclusive),string('#,##0.0##'),string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@minExclusive"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="@minInclusive != ''">
- <xsl:choose>
- <xsl:when test="@type = 'cm:floatProp'">
- <xsl:value-of select="xtsext:formatNumber(string(@minInclusive),string('#,##0.0##'),string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@minInclusive"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
-
- <!-- max value -->
- <xsl:variable name="max">
- <xsl:choose>
- <xsl:when test="@maxExclusive != ''">
- <xsl:choose>
- <xsl:when test="@type = 'cm:floatProp'">
- <xsl:value-of select="xtsext:formatNumber(string(@maxExclusive),string('#,##0.0##'),string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@maxExclusive"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="@maxInclusive != ''">
- <xsl:choose>
- <xsl:when test="@type = 'cm:floatProp'">
- <xsl:value-of select="xtsext:formatNumber(string(@maxInclusive),string('#,##0.0##'),string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@maxInclusive"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="$min != '' and $max != '' and @minExclusive != '' and @maxExclusive != ''">
- <xts:string id="IDS_PROP_SETTINGS_MIN_MAX_EXCLUSIVE_TOOLTIP">
- <xts:param name="min"><xsl:value-of select="$min"/></xts:param>
- <xts:param name="max"><xsl:value-of select="$max"/></xts:param>
- </xts:string>
- </xsl:when>
- <xsl:when test="$min != '' and @minExclusive != ''">
- <xts:string id="IDS_PROP_SETTINGS_MIN_EXCLUSIVE_TOOLTIP">
- <xts:param name="min"><xsl:value-of select="$min"/></xts:param>
- </xts:string>
- </xsl:when>
- <xsl:when test="$max != '' and @maxExclusive != ''">
- <xts:string id="IDS_PROP_SETTINGS_MAX_EXCLUSIVE_TOOLTIP">
- <xts:param name="max"><xsl:value-of select="$max"/></xts:param>
- </xts:string>
- </xsl:when>
- <xsl:when test="$min != '' and $max != '' and @minInclusive != '' and @maxInclusive != ''">
- <xts:string id="IDS_PROP_SETTINGS_MIN_MAX_INCLUSIVE_TOOLTIP">
- <xts:param name="min"><xsl:value-of select="$min"/></xts:param>
- <xts:param name="max"><xsl:value-of select="$max"/></xts:param>
- </xts:string>
- </xsl:when>
- <xsl:when test="$min != '' and @minInclusive != ''">
- <xts:string id="IDS_PROP_SETTINGS_MIN_INCLUSIVE_TOOLTIP">
- <xts:param name="min"><xsl:value-of select="$min"/></xts:param>
- </xts:string>
- </xsl:when>
- <xsl:when test="$max != '' and @maxInclusive != ''">
- <xts:string id="IDS_PROP_SETTINGS_MAX_INCLUSIVE_TOOLTIP">
- <xts:param name="max"><xsl:value-of select="$max"/></xts:param>
- </xts:string>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <dt:localizedFloatTextBox track="true"/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug
- ===============================================================================================
- -->
- <xts:block id="debug" type="exec" mode="output" processor="XSLT" condition=".[/root/session/param[@name='debug']='1']" mandatory="false" mimeType="text/html" dependency="renderPage">
- <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"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|