Changeset 9281

Show
Ignore:
Timestamp:
20.06.2007 12:55:14 (17 months ago)
Author:
sys
Message:

compositionXhtmlTransf : Ajout dans sm:link/callModel la présevation du contexte de nav : @navCtx="preserveCurrent"

Location:
trunk/Wsp_Modeling
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/es/content/organisation/compositionXhtmlTransf/xml.xed.xml

    r9279 r9281  
    221221                </element> 
    222222                 
     223                <element se:id="sm:callModelLink" se:name="sm:callModel" se:bind="element" forcefilled="true"> 
     224                        <childs> 
     225                                <alternativeAlone se:bind="choice"> 
     226                                        <element se:name="sm:root" se:bind="element" forcefilled="true"> 
     227                                                <atts> 
     228                                                        <se:ref se:refid="att_axis"/> 
     229                                                        <attribute se:id="navCtx" se:name="navCtx" se:bind="attribute" se:defaultvalue="newRoot"> 
     230                                                                <choiceInput> 
     231                                                                        <ciItem label="newRoot"/> 
     232                                                                        <ciItem label="preserveCurrent"/> 
     233                                                                </choiceInput> 
     234                                                        </attribute> 
     235                                                </atts> 
     236                                        </element> 
     237                                        <element se:name="sm:current" se:bind="element" forcefilled="true"> 
     238                                                <atts> 
     239                                                        <se:ref se:refid="att_axis"/> 
     240                                                        <se:ref se:refid="navCtx"/> 
     241                                                </atts> 
     242                                        </element> 
     243                                        <element se:name="sm:lookForAscendants" se:bind="element" forcefilled="true"> 
     244                                                <atts> 
     245                                                        <attribute se:bind="attribute" se:name="direction" se:defaultvalue="currentToRoot"> 
     246                                                                <choiceInput> 
     247                                                                        <ciItem label="currentToRoot"/> 
     248                                                                        <ciItem label="rootToCurrent"/> 
     249                                                                </choiceInput> 
     250                                                        </attribute> 
     251                                                        <se:ref se:refid="att_axis"/> 
     252                                                        <se:ref se:refid="navCtx"/> 
     253                                                </atts> 
     254                                                <childs> 
     255                                                        <element se:name="sm:callableModel" se:bind="element" se:card="+"> 
     256                                                                <atts> 
     257                                                                        <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*#Class\b[\w:]*:Content.*"/> 
     258                                                                </atts> 
     259                                                        </element> 
     260                                                        <insert se:bind="current"/> 
     261                                                </childs> 
     262                                        </element> 
     263                                        <element se:name="sm:agentPath" se:bind="element" forcefilled="true"> 
     264                                                <atts> 
     265                                                        <attribute se:bind="attribute" se:name="path" se:mandat="true" se:defaultvalue="/@@"> 
     266                                                                <wordsInput trim="true" notnull="true"/> 
     267                                                        </attribute> 
     268                                                </atts> 
     269                                                <childs> 
     270                                                        <element se:name="sm:callableModel" se:bind="element" se:card="+" 
     271                                                                tooltipTag="&organisation.composition.callModel.agentPath.callableModel;"> 
     272                                                                <atts> 
     273                                                                        <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*#Class\b[\w:]*:Content.*"/> 
     274                                                                </atts> 
     275                                                        </element> 
     276                                                        <insert se:bind="current"/> 
     277                                                </childs> 
     278                                        </element> 
     279                                </alternativeAlone> 
     280                        </childs> 
     281                </element> 
     282                 
    223283                <element se:id="sm:defaultStyle" se:name="sm:defaultStyle" se:bind="element" se:card="?" insert="true"> 
    224284                        <childs> 
     
    449509                                                                <se:ref se:refid="sm:callSubModel" insert="collapsed"/> 
    450510                                                                <se:ref se:refid="sm:callPartMeta" insert="collapsed"/> 
    451                                                                 <se:ref se:refid="sm:callModel" insert="collapsed"/> 
     511                                                                <se:ref se:refid="sm:callModelLink" insert="collapsed"/> 
    452512                                                                <element se:name="sm:lookForExistingSubModelPage" se:bind="element" insert="collapsed"> 
    453513                                                                        <atts> 
     
    939999                                                                <se:ref se:refid="sm:page_Fix" insert="collapsed"/> 
    9401000                                                                <se:ref se:refid="sm:callCompositionMeta" insert="collapsed"/> 
    941                                                                 <se:ref se:refid="sm:callModel" insert="collapsed"/> 
     1001                                                                <se:ref se:refid="sm:callModelLink" insert="collapsed"/> 
    9421002                                                                <se:ref se:refid="sm:externalUrl"/> 
    9431003                                                        </alternative> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_compositionXhtmlTransf/bs.xml.xsl

    r9279 r9281  
    655655        <xsl0:template match="sm:root" mode="callModel"> 
    656656                <xsl0:choose> 
    657                         <xsl0:when test="count(parent::sm:callModel/parent::sm:link) != 0"> 
     657                        <xsl0:when test="parent::sm:callModel/parent::sm:link"> 
    658658                                <!-- On demande la page liée et on retourne l'url de cette page. --> 
    659                                 <source type="xpath-dynamique">resultatDialogue(concat('/@', getIdFromPath(concat('src:', java:hGetUri(srcFileAgent('@@')))), '<xsl0:value-of select="getAxisSuffix(@axis)"/>'), 'act:')</source> 
    660                         </xsl0:when> 
    661                         <xsl0:when test="count(/sm:compositionXhtmlTransf/sm:content)!= 0 or count(ancestor::sm:mainZone)!= 0 or count(ancestor::sm:zone) != 0"> 
     659                                <source type="xpath-dynamique">resultatDialogue(concat('<xsl0:value-of select="si(@navCtx='preserveCurrent', '@', '/@')"/>', getIdFromPath(concat('src:', java:hGetUri(srcFileAgent('@@')))), '<xsl0:value-of select="getAxisSuffix(@axis)"/>'), 'act:')</source> 
     660                        </xsl0:when> 
     661                        <xsl0:when test="/sm:compositionXhtmlTransf/sm:content or ancestor::sm:mainZone or ancestor::sm:zone"> 
    662662                                <!-- On demande le contenu de cet agent. --> 
    663663                                <source type="xpath-dynamique">resultatAgent(concat('@', getIdFromPath(concat('src:', java:hGetUri(srcFileAgent('@@')))), '<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'))</source> 
     
    671671        <xsl0:template match="sm:current" mode="callModel"> 
    672672                <xsl0:choose> 
    673                         <xsl0:when test="count(parent::sm:callModel/parent::sm:link) != 0"> 
     673                        <xsl0:when test="parent::sm:callModel/parent::sm:link"> 
    674674                                <!-- On demande la page liée et on retourne l'url de cette page. --> 
    675                                 <source type="xpath-dynamique">resultatDialogue(concat('/@', switchAxis(codeAgent('//'), '<xsl0:value-of select="@axis"/>')), 'act:')</source> 
    676                         </xsl0:when> 
    677                         <xsl0:when test="count(/sm:compositionXhtmlTransf/sm:content)!= 0 or count(ancestor::sm:mainZone)!= 0 or count(ancestor::sm:zone) != 0"> 
     675                                <source type="xpath-dynamique">resultatDialogue(concat('<xsl0:value-of select="si(@navCtx='preserveCurrent', '@', '/@')"/>', switchAxis(codeAgent('//'), '<xsl0:value-of select="@axis"/>')), 'act:')</source> 
     676                        </xsl0:when> 
     677                        <xsl0:when test="/sm:compositionXhtmlTransf/sm:content or ancestor::sm:mainZone or ancestor::sm:zone"> 
    678678                                <!-- On demande le contenu de cet agent. --> 
    679679                                <source type="xpath-dynamique">resultatAgent(concat('@', switchAxis(codeAgent('//'), '<xsl0:value-of select="@axis"/>'), '/xhtmlContent'))</source> 
     
    687687        <xsl0:template match="sm:lookForAscendants" mode="callModel"> 
    688688                <xsl0:choose> 
    689                         <xsl0:when test="count(parent::sm:callModel/parent::sm:link) != 0"> 
     689                        <xsl0:when test="parent::sm:callModel/parent::sm:link"> 
    690690                                <!-- On demande la page liée et on retourne l'url de cette page. --> 
    691                                 <source type="xpath-dynamique">resultatDialogue(concat('/@', switchAxis(codeAgent(lookForAncestorAgentByTypes($vDialog<xsl0:apply-templates mode="callModel"/>)[<xsl0:value-of select="si(@direction='rootToCurrent', 'last()', '1')"/>]), '<xsl0:value-of select="@axis"/>')), 'act:')</source> 
    692                         </xsl0:when> 
    693                         <xsl0:when test="count(/sm:compositionXhtmlTransf/sm:content)!= 0 or count(ancestor::sm:mainZone)!= 0 or count(ancestor::sm:zone) != 0"> 
     691                                <source type="xpath-dynamique">resultatDialogue(concat('<xsl0:value-of select="si(@navCtx='preserveCurrent', '@', '/@')"/>', switchAxis(codeAgent(lookForAncestorAgentByTypes($vDialog<xsl0:apply-templates mode="callModel"/>)[<xsl0:value-of select="si(@direction='rootToCurrent', 'last()', '1')"/>]), '<xsl0:value-of select="@axis"/>')), 'act:')</source> 
     692                        </xsl0:when> 
     693                        <xsl0:when test="/sm:compositionXhtmlTransf/sm:content or ancestor::sm:mainZone or ancestor::sm:zone"> 
    694694                                <!-- On demande le contenu de cet agent. --> 
    695695                                <source type="xpath-dynamique">resultatAgent(concat('@', switchAxis(codeAgent(lookForAncestorAgentByTypes($vDialog<xsl0:apply-templates mode="callModel"/>)[<xsl0:value-of select="si(@direction='rootToCurrent', 'last()', '1')"/>]), '<xsl0:value-of select="@axis"/>'), '/xhtmlContent'))</source> 
     
    704704        <xsl0:template match="sm:agentPath" mode="callModel"> 
    705705                <xsl0:choose> 
    706                         <xsl0:when test="count(parent::sm:callModel/parent::sm:link) != 0"> 
     706                        <xsl0:when test="parent::sm:callModel/parent::sm:link"> 
    707707                                <!-- On demande la page liée et on retourne l'url de cette page. --> 
    708708                                <source type="xpath-dynamique">resultatDialogue('<xsl0:value-of select="@path"/>', 'act:')</source> 
    709709                        </xsl0:when> 
    710                         <xsl0:when test="count(/sm:compositionXhtmlTransf/sm:content)!= 0 or count(ancestor::sm:mainZone)!= 0 or count(ancestor::sm:zone) != 0"> 
     710                        <xsl0:when test="/sm:compositionXhtmlTransf/sm:content or ancestor::sm:mainZone or ancestor::sm:zone"> 
    711711                                <!-- On demande le contenu de cet agent (résolu par rapport au dialog en cours). --> 
    712712                                <source type="xpath-dynamique">resultatAgent(agent('<xsl0:value-of select="@path"/>', $vDialog))</source>