Changeset 9846


Ignore:
Timestamp:
10/19/07 10:14:31 (4 years ago)
Author:
sys
Message:

Ajout callModel dans dataForm.

Location:
trunk/Wsp_Modeling
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/es/content/data/dataFormXhtmlTransf/xml.xed.xml

    r9623 r9846  
    7676                </se:template> 
    7777                 
     78                <element se:id="sm:callModel" se:name="sm:callModel" se:bind="element" forcefilled="true"> 
     79                        <childs> 
     80                                <alternativeAlone se:id="choice_callModel" se:bind="choice"> 
     81                                        <element se:name="sm:current" se:bind="element" forcefilled="true"> 
     82                                                <atts> 
     83                                                        <se:ref se:refid="axis"/> 
     84                                                </atts> 
     85                                        </element> 
     86                                        <element se:name="sm:root" se:bind="element" forcefilled="true"> 
     87                                                <atts> 
     88                                                        <se:ref se:refid="axis"/> 
     89                                                </atts> 
     90                                        </element> 
     91                                        <element se:name="sm:lookForAscendants" se:bind="element" forcefilled="true"> 
     92                                                <atts> 
     93                                                        <attribute se:bind="attribute" se:name="direction" se:defaultvalue="currentToRoot"> 
     94                                                                <choiceInput> 
     95                                                                        <ciItem label="currentToRoot"/> 
     96                                                                        <ciItem label="rootToCurrent"/> 
     97                                                                </choiceInput> 
     98                                                        </attribute> 
     99                                                        <se:ref se:refid="axis"/> 
     100                                                </atts> 
     101                                                <childs> 
     102                                                        <element se:name="sm:callableModel" se:bind="element" se:card="+"> 
     103                                                                <atts> 
     104                                                                        <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*#Class\b[\w:]*:Content.*"/> 
     105                                                                </atts> 
     106                                                        </element> 
     107                                                        <insert se:bind="current"/> 
     108                                                </childs> 
     109                                        </element> 
     110                                        <element se:name="sm:agentPath" se:bind="element" forcefilled="true"> 
     111                                                <atts> 
     112                                                        <attribute se:bind="attribute" se:name="path" se:mandat="true" se:defaultvalue="/@@"> 
     113                                                                <wordsInput trim="true" notnull="true"/> 
     114                                                        </attribute> 
     115                                                </atts> 
     116                                                <childs> 
     117                                                        <element se:name="sm:callableModel" se:bind="element" se:card="+"> 
     118                                                                <atts> 
     119                                                                        <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*#Class\b[\w:]*:Content.*"/> 
     120                                                                </atts> 
     121                                                        </element> 
     122                                                        <insert se:bind="current"/> 
     123                                                </childs> 
     124                                        </element> 
     125                                </alternativeAlone> 
     126                        </childs> 
     127                </element> 
     128                 
     129                <element se:id="sm:callModelLink" se:name="sm:callModel" se:bind="element" forcefilled="true"> 
     130                        <childs> 
     131                                <alternativeAlone se:bind="choice"> 
     132                                        <element se:name="sm:root" se:bind="element" forcefilled="true"> 
     133                                                <atts> 
     134                                                        <se:ref se:refid="axis"/> 
     135                                                        <attribute se:id="navCtx" se:name="navCtx" se:bind="attribute" se:defaultvalue="newRoot"> 
     136                                                                <choiceInput> 
     137                                                                        <ciItem label="newRoot"/> 
     138                                                                        <ciItem label="preserveCurrent"/> 
     139                                                                </choiceInput> 
     140                                                        </attribute> 
     141                                                </atts> 
     142                                        </element> 
     143                                        <element se:name="sm:current" se:bind="element" forcefilled="true"> 
     144                                                <atts> 
     145                                                        <se:ref se:refid="axis"/> 
     146                                                        <se:ref se:refid="navCtx"/> 
     147                                                </atts> 
     148                                        </element> 
     149                                        <element se:name="sm:lookForAscendants" se:bind="element" forcefilled="true"> 
     150                                                <atts> 
     151                                                        <attribute se:bind="attribute" se:name="direction" se:defaultvalue="currentToRoot"> 
     152                                                                <choiceInput> 
     153                                                                        <ciItem label="currentToRoot"/> 
     154                                                                        <ciItem label="rootToCurrent"/> 
     155                                                                </choiceInput> 
     156                                                        </attribute> 
     157                                                        <se:ref se:refid="axis"/> 
     158                                                        <se:ref se:refid="navCtx"/> 
     159                                                </atts> 
     160                                                <childs> 
     161                                                        <element se:name="sm:callableModel" se:bind="element" se:card="+"> 
     162                                                                <atts> 
     163                                                                        <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*#Class\b[\w:]*:Content.*"/> 
     164                                                                </atts> 
     165                                                        </element> 
     166                                                        <insert se:bind="current"/> 
     167                                                </childs> 
     168                                        </element> 
     169                                        <element se:name="sm:agentPath" se:bind="element" forcefilled="true"> 
     170                                                <atts> 
     171                                                        <attribute se:bind="attribute" se:name="path" se:mandat="true" se:defaultvalue="/@@"> 
     172                                                                <wordsInput trim="true" notnull="true"/> 
     173                                                        </attribute> 
     174                                                </atts> 
     175                                                <childs> 
     176                                                        <element se:name="sm:callableModel" se:bind="element" se:card="+"> 
     177                                                                <atts> 
     178                                                                        <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*#Class\b[\w:]*:Content.*"/> 
     179                                                                </atts> 
     180                                                        </element> 
     181                                                        <insert se:bind="current"/> 
     182                                                </childs> 
     183                                        </element> 
     184                                </alternativeAlone> 
     185                        </childs> 
     186                </element> 
     187                 
    78188                <se:choice se:id="forField_choice" se:card="*" se:show="ifExist"> 
    79189                        <element se:name="sm:fieldName" se:id="forField_fieldName" se:bind="element" forcefilled="true"> 
     
    122232                                </childs> 
    123233                        </element> 
     234                        <se:ref se:refid="sm:callModel"/> 
    124235                        <element se:id="sm:W2ColsFieldRow" se:bind="element" se:name="sm:W2ColsFieldRow"> 
    125236                                <atts> 
     
    251362                                                                <se:ref se:refid="forField_fieldValueRefItem" insert="collapsed"/> 
    252363                                                                <se:ref se:refid="forField_fieldValueOtherType" insert="collapsed"/> 
     364                                                                <se:ref se:refid="sm:callModelLink" insert="collapsed"/> 
    253365                                                        </alternative> 
    254366                                                </childs> 
     
    524636                                                                        </childs> 
    525637                                                                </element> 
     638 
     639                                                                <se:ref se:refid="sm:callModel"/> 
     640                                                                 
    526641                                                                <element se:name="sm:choose" se:id="sm:choose" se:bind="element" forcefilled="true"> 
    527642                                                                        <childs> 
     
    663778                                                                                                        <se:ref se:refid="nav_fieldValueOtherType" insert="collapsed"/> 
    664779                                                                                                        <se:ref se:refid="nav_subData" insert="collapsed"/> 
     780                                                                                                        <se:ref se:refid="sm:callModelLink" insert="collapsed"/> 
    665781                                                                                                </alternative> 
    666782                                                                                        </childs> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_dataFormXhtmlTransf/bs.xml.xsl

    r9295 r9846  
    116116                        <!-- Cas : sm:content --> 
    117117                        <xsl0:apply-templates select="sm:content"/> 
     118                        <!-- Agents callModel --> 
     119                        <xsl0:apply-templates mode="callModel" select="descendant::sm:callModel"/> 
    118120                </structure> 
    119121        </xsl0:template> 
     
    144146                        </source> 
    145147                        <xsl0:apply-templates mode="agentsWidgets"/> 
    146                 </valeur>                
     148                </valeur> 
    147149        </xsl0:template> 
    148150         
     
    281283        </xsl0:template> 
    282284        <!-- --> 
     285        <xsl0:template match="sm:callModel" mode="content">[![agent=//callModel_<xsl0:value-of select="generate-id()"/>]!]</xsl0:template> 
    283286        <!-- --> 
    284287        <xsl0:template match="sm:fieldValueString" mode="content"> 
     
    411414                </valeur> 
    412415        </xsl0:template> 
     416         
    413417</xsl0:stylesheet> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_dataFormXhtmlTransf/calledTransformersInc.xsl

    r9505 r9846  
    139139        </xsl:template>  
    140140         
     141         
     142        <xsl:template match="sm:callModel" mode="in"> 
     143                <xsl:apply-templates mode="in"> 
     144                        <xsl:with-param name="vView" select="si(local-name(..)!='link', 'xhtmlContent', 'navigation')"/> 
     145                </xsl:apply-templates> 
     146        </xsl:template> 
     147        <xsl:template match="sm:current" mode="in"> 
     148                <xsl:param name="vView"/> 
     149                <call model="{getIdFromPath(/sm:*/sm:model/@sc:refUri)}" axis="{@axis}" view="{$vView}"/> 
     150        </xsl:template> 
     151        <xsl:template match="sm:root" mode="in"> 
     152                <xsl:param name="vView"/> 
     153                <xsl:variable name="vAxis" select="@axis"/> 
     154                <xsl:for-each select="agentsLies(computeNodeAgent('//agentGenerator', 'listAgentRootAllowed'))"> 
     155                        <call model="{codeAgent(.)}" axis="{$vAxis}" view="{$vView}"/> 
     156                </xsl:for-each> 
     157        </xsl:template> 
     158        <xsl:template match="sm:lookForAscendants" mode="in"> 
     159                <xsl:param name="vView"/> 
     160                <xsl:variable name="vAxis" select="@axis"/> 
     161                <xsl:for-each select="sm:callableModel"> 
     162                        <call model="{getIdFromPath(@sc:refUri)}" axis="{$vAxis}" view="{$vView}"/> 
     163                </xsl:for-each> 
     164        </xsl:template> 
     165        <xsl:template match="sm:agentPath" mode="in"> 
     166                <xsl:param name="vView"/> 
     167                <xsl:for-each select="sm:callableModel"> 
     168                        <call model="{getIdFromPath(@sc:refUri)}" axis="{@axis}" view="{$vView}"/> 
     169                </xsl:for-each> 
     170        </xsl:template> 
     171         
    141172        <xsl:template match="text()|@*" mode="in"/> 
    142173</xsl:stylesheet> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_dataFormXhtmlTransf/common.xsl.xsl

    r9302 r9846  
    8787        </xsl0:template> 
    8888        <xsl0:template match="sm:callSubModel" mode="nav"><xsl0:param name="vField"/>[![agent=<xsl0:call-template name="callSubModelPathAgent"><xsl0:with-param name="vField" select="$vField"/></xsl0:call-template>;arguments=act:]!]</xsl0:template> 
     89        <xsl0:template match="sm:callModel" mode="nav">[![agent=//callModel_<xsl0:value-of select="generate-id()"/>]!]</xsl0:template> 
    8990        <xsl0:template match="text()|@*" mode="nav"/> 
    9091        <xsl0:template match="*" mode="nav"/> 
     
    106107        <xsl0:template match="*" mode="string"/> 
    107108         
     109                 
     110        <!-- ######### callModel. ########--> 
     111        <xsl0:template match="sm:callModel" mode="callModel"> 
     112                <valeur code="callModel_{generate-id()}"> 
     113                        <xsl0:choose> 
     114                                <xsl0:when test="parent::sm:link"> 
     115                                        <!-- On demande la page liée et on retourne l'url de cette page. --> 
     116                                        <source type="xpath-dynamique">resultatDialogue(<xsl0:if test="not(*/@navCtx='preserveCurrent')">concat('/', </xsl0:if><xsl0:apply-templates mode="callModel"/><xsl0:if test="not(*/@navCtx='preserveCurrent')">)</xsl0:if>, 'act:')</source> 
     117                                </xsl0:when> 
     118                                <xsl0:otherwise> 
     119                                        <!-- On demande le contenu de cet agent. --> 
     120                                        <source type="xpath-dynamique">resultatAgent(concat(<xsl0:apply-templates mode="callModel"/>, '/xhtmlContent'))</source> 
     121                                </xsl0:otherwise> 
     122                        </xsl0:choose> 
     123                </valeur> 
     124        </xsl0:template> 
     125        <!-- 
     126        <xsl0:template match="sm:lookForExistingModelPage" mode="callModel"> 
     127                <valeur code="lookForPage_{generate-id()}"> 
     128                        <source type="xpath-dynamique">resultatDialogue(<xsl0:apply-templates mode="callModel" select="sm:navContext/*"/>, concat('lookFor:computeResultWithArguments=act:&amp;codeAgentPrinc=', codeAgent(<xsl0:apply-templates mode="callModel" select="sm:target/*"/>)))</source> 
     129                </valeur> 
     130        </xsl0:template> 
     131        --> 
     132        <xsl0:template match="sm:root" mode="callModel">concat('@', getIdFromPath(concat('src:', java:hGetUri(srcFileAgent('@@')))), '<xsl0:value-of select="getAxisSuffix(@axis)"/>')</xsl0:template> 
     133        <xsl0:template match="sm:current" mode="callModel">concat('@', switchAxis(codeAgent('//'), '<xsl0:value-of select="@axis"/>'))</xsl0:template> 
     134        <xsl0:template match="sm:lookForAscendants" mode="callModel">concat('@', switchAxis(codeAgent(lookForAncestorAgentByTypes($vDialog<xsl0:apply-templates mode="callModel"/>)[<xsl0:value-of select="si(@direction='rootToCurrent', 'last()', '1')"/>]), '<xsl0:value-of select="@axis"/>'))</xsl0:template> 
     135        <xsl0:template match="sm:callableModel" mode="callModel">,'<xsl0:value-of select="resultatAgent(concat('@', getIdFromPath(@sc:refUri), '/codeModel'))"/>'</xsl0:template> 
     136        <xsl0:template match="sm:agentPath" mode="callModel">pathAgent(agent('<xsl0:value-of select="@path"/>', $vDialog))</xsl0:template> 
     137        <xsl0:template match="sm:currentNav" mode="callModel">'.'</xsl0:template> 
     138        <xsl0:template match="sm:fromNewRoot" mode="callModel"><xsl0:apply-templates mode="callModel"/></xsl0:template> 
     139        <xsl0:template match="*" mode="callModel"/> 
     140        <xsl0:template match="text()|@*" mode="callModel"/> 
    108141</xsl0:stylesheet> 
Note: See TracChangeset for help on using the changeset viewer.