Changeset 9394

Show
Ignore:
Timestamp:
25.07.2007 01:11:18 (3 years ago)
Author:
sys
Message:

navOutline : activation de la version complète.

Location:
trunk
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/Jav_GE/com/scenari/m/ge/agent/IWAgentOutline.java

    r7358 r9394  
    2121     */ 
    2222    public boolean isRejected(IHDialog pDialog) throws Exception; 
     23 
     24    /** 
     25     * Indique que cet agent est mat�alis� la publication par un contenu propre. 
     26     * Notion de Folder with content / folderPage par opposition aux dossier sans contenus associ� 
     27     * (page d��au folder n'apparaissant en entr�fille dans l'outline). 
     28     */ 
     29    public boolean isMaterialized(IHDialog pDialog) throws Exception; 
    2330     
    2431} 
  • trunk/Jav_GE/com/scenari/m/ge/agent/OutlineWalker.java

    r9203 r9394  
    6363 
    6464        } 
     65         
     66        /** 
     67         * Restreint les noeuds �eux qui sont mat�alis�dans le contenu. 
     68         */ 
     69        protected boolean fRestrictToMaterializedNode = false; 
    6570 
    6671        /** 
     
    912917 
    913918        protected boolean xIsSkipped(IWAgent pAgt) throws Exception { 
    914                 return (pAgt instanceof IWAgentOutline) && ((IWAgentOutline) pAgt).isSkipped(fCurrentDialog); 
     919                if(pAgt instanceof IWAgentOutline) { 
     920                        return ((IWAgentOutline) pAgt).isSkipped(fCurrentDialog) || (fRestrictToMaterializedNode && ! ((IWAgentOutline) pAgt).isMaterialized(fCurrentDialog)); 
     921                } 
     922                return false; 
    915923        } 
    916924 
     
    10261034                return vPos; 
    10271035        } 
     1036 
     1037        public boolean isRestrictToMaterializedNode() { 
     1038                return fRestrictToMaterializedNode; 
     1039        } 
     1040 
     1041        public void setRestrictToMaterializedNode(boolean pRestrictToMaterializedNode) { 
     1042                fRestrictToMaterializedNode = pRestrictToMaterializedNode; 
     1043        } 
    10281044} 
  • trunk/Jav_GE/com/scenari/m/ge/agent/pages/HAgentPages.java

    r8541 r9394  
    130130                return false; 
    131131        } 
     132 
     133        public boolean isMaterialized(IHDialog pDialog) throws Exception { 
     134                return true; 
     135        } 
     136 
    132137} 
  • trunk/Jav_GE/com/scenari/m/ge/agent/scenario/HAgentScenario.java

    r7467 r9394  
    100100                return hGetIntitule(pDialog).length() == 0; 
    101101        } 
     102 
     103        /** 
     104         * Avec cette impl�ntaton, un noeud de l'outline est mat�alis�   * que si son 1er fils est une noeud rejet�e l'outline constituant par cons�ent son contenu. 
     105         */ 
     106        public boolean isMaterialized(IHDialog pDialog) throws Exception{ 
     107        IWADialog vDialog = null; 
     108 
     109        if (pDialog instanceof IWADialog) { 
     110            vDialog = (IWADialog) pDialog; 
     111        } else { 
     112            vDialog = hNewDialog(pDialog); 
     113        } 
     114        String[] vCodesAgents = ((WComposantScenario) fComposant).hGetCodesAgentsLies(this, vDialog); 
     115                if(vCodesAgents.length > 0) { 
     116                        IWAgent vAgt = hGetAgentParRef(vCodesAgents[0]); 
     117                        if(vAgt != null && vAgt instanceof IWAgentOutline) { 
     118                                return ((IWAgentOutline)vAgt).isRejected(pDialog); 
     119                        } 
     120                } 
     121                return false; 
     122        } 
    102123} 
  • trunk/Jav_GE/com/scenari/m/ge/donnee/WDonneeNavOutline.java

    r9023 r9394  
    152152                        if (fIncludeCompType != null) { 
    153153                                if(fCompTypeAllowed) { 
    154                                         String vCd = pWalker.getAgent().hGetComposant().hGetComposantType().hGetCode(); 
     154                                        String vCd = pWalker.getAgent().hGetComposant().hGetComposantPrincipal().hGetComposantType().hGetCode(); 
    155155                                        for (int i = 0; i < fIncludeCompType.length; i++) { 
    156156                                                if (vCd.equals(fIncludeCompType[i])) return true; 
     
    158158                                        return false; 
    159159                                } else { 
    160                                         String vCd = pWalker.getAgent().hGetComposant().hGetComposantType().hGetCode(); 
     160                                        String vCd = pWalker.getAgent().hGetComposant().hGetComposantPrincipal().hGetComposantType().hGetCode(); 
    161161                                        for (int i = 0; i < fIncludeCompType.length; i++) { 
    162162                                                if (vCd.equals(fIncludeCompType[i])) return false; 
     
    268268                                return true; 
    269269                        } else { 
    270                                 String pUrl = pWalker.getDialogUrl(); 
    271270                                if (!pWalker.gotoPrevious()) return false; 
    272                                 while (!isEntryAllowed(pWalker) || pUrl.equals(pWalker.getDialogUrl())) { 
     271                                while (!isEntryAllowed(pWalker)) { 
    273272                                        if (!pWalker.gotoPrevious()) return false; 
    274273                                } 
     
    415414                super(); 
    416415                fWalker = new OutlineWalker(); 
     416                fWalker.setRestrictToMaterializedNode(true); 
    417417                fWalker.setCurrDesc(OutlineWalker.NO_LIMIT, OutlineWalker.FROM_STARTINGPOINT); 
    418418                fWalker.setUncleFrom(OutlineWalker.DIR_UP_DOWN, 0); 
  • trunk/Wsp_Modeling/es/content/uiWidget/navUiWidget/xml.xed.xml

    r8919 r9394  
    105105                                                                <xul:alternativeAlone se:bind="choice" se:defaultChild="-1"> 
    106106                                                                        <xul:element se:id="direction" se:name="sm:next" se:bind="element" forcefilled="true"> 
    107 <!--                                                                            <xul:childs> 
     107                                                                                <xul:childs> 
    108108                                                                                        <xul:alternative se:id="models" se:bind="choice"> 
    109109                                                                                                <xul:list se:bind="current" se:name="sm:includeModel"> 
     
    121121                                                                                                </xul:list> 
    122122                                                                                        </xul:alternative> 
    123                                                                                 </xul:childs> --> 
     123                                                                                </xul:childs> 
    124124                                                                        </xul:element> 
    125125                                                                        <se:ref se:name="sm:previous" se:refid="direction"/> 
     
    154154                                                                                        </xul:attribute> 
    155155                                                                                </xul:atts> 
    156 <!--                                                                            <xul:childs> 
     156                                                                                <xul:childs> 
    157157                                                                                        <se:ref se:refid="models"/> 
    158                                                                                 </xul:childs> --> 
     158                                                                                </xul:childs> 
    159159                                                                        </xul:element> 
    160160                                                                        <xul:element se:id="point" se:name="sm:home" se:bind="element" forcefilled="true"/> 
     
    163163                                                        </xul:childs> 
    164164                                                </xul:element> 
    165 <!--                                            <xul:element se:name="sm:ifNone" se:bind="element" se:card="?"> 
     165                                                <xul:element se:name="sm:ifNone" se:bind="element" se:card="?"> 
    166166                                                        <xul:childs> 
    167167                                                                <se:ref se:refid="sm:step"/> 
     
    169169                                                        </xul:childs> 
    170170                                                </xul:element> 
    171                                                 <xul:insert se:bind="current"/> --> 
     171                                                <xul:insert se:bind="current"/> 
    172172                                        </xul:childs> 
    173173                                </xul:element> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_navUiWidget.xml

    r8898 r9394  
    6666                <source type="inclusion-dynamique"> 
    6767                        <source type="fixe"><![CDATA[ 
    68                                 <source type="outline-dynamique">[![agent=//navOutlineDef]!]</source> 
    69                                 <transformationxsl href="[![agent=//xslUrl;arguments=act:]!]"/> 
     68                                <source type="xsl-dynamique" href="[![agent=//xsl;arguments=act:]!]"/> 
     69                                <valeur code="pathDialog"> 
     70                                        <source type="navOutline-dynamique">[![agent=//navOutlineDef]!]</source> 
     71                                </valeur> 
    7072                        ]]></source> 
    7173                </source> 
    7274        </valeur> 
    73         <valeur code="navOutlineDef"> 
    74                 <source type="xsl-statique" href="bs:navOutlineDef.xsl"/> 
    75         </valeur> 
    76         <affichage code="xslContent" codecomposant="'xslUrl'"> 
     75        <affichage code="xsl"> 
    7776                <urlPage type="xpathOnSrc-dynamique">concat('bs.doss/_common/wdgt/', @code, '/nav.xsl')</urlPage> 
    7877                <page> 
     
    8079                </page> 
    8180        </affichage> 
    82 <!-- TODO 
    83         <affichage code="xslContent"> 
    84                 <urlPage type="xpathOnSrc-dynamique">concat('bs.doss/_common/wdgt/', @code, '/nav.xsl')</urlPage> 
    85                 <page> 
    86                         <zone cle="mainZone" type="xslOnSrc-dynamique" href="bs:content.xsl.xsl"/> 
    87                 </page> 
    88         </affichage> 
    89  -->     
     81        <valeur code="navOutlineDef"> 
     82                <source type="xsl-statique" href="bs:navOutlineDef.xsl"/> 
     83        </valeur> 
     84  
    9085        <!-- @API Retourne l'occurence d'une zone. Valeur retourn�: 
    9186                One 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_navUiWidget/content.xsl.xsl

    r9143 r9394  
    5252        <xsl0:param name="vDialog"/> 
    5353        <xsl0:param name="vAgent"/> 
    54 <!--     
    55         <xsl0:template match="sm:navUiWidget"> 
    56                 <xsl:stylesheet version="1.0" exclude-result-prefixes="sc" xmlns:redirect="com.scenari.xsldom.xalan.lib.Redirect"  extension-element-prefixes="redirect"> 
    57                         <xsl:output method="xml" indent="no" omit-xml-declaration="yes"/> 
    58                         <xsl:param name="vDialog"/> 
    59                         <xsl:param name="vAgent"/> 
    60                          
    61                         <xsl:variable name="vTargetDialog" select="resultatAgent(pathAgent)"/> 
    62                          
    63                         <xsl:template match="*"> 
    64                                 <div><a href="{{resultatAgent(dialog($vTargetDialog), 'act:')}}"><xsl0:value-of select="@code"/> = <xsl:value-of select="$vTargetDialog"/></a></div> 
    65                         </xsl:template> 
    66  
    67                 </xsl:stylesheet> 
    68         </xsl0:template> 
    69  --> 
    7054 
    7155        <xsl0:template match="sm:navUiWidget"> 
     
    7458                        <xsl:param name="vDialog"/> 
    7559                        <xsl:param name="vAgent"/> 
     60                         
     61                        <xsl:variable name="vTargetDialog" select="resultatAgent(pathDialog)"/> 
     62                        <xsl:variable name="vTargetTitle" select="si($vTargetDialog, intituleAgent(dialog($vTargetDialog)), '')"/> 
    7663 
    77                         <xsl:template match="treeContent"> 
     64                        <xsl:template match="*"> 
    7865                                <xsl0:if test="resultatAgent('//agentGenerator', 'debug') != 'no'"> 
    79                                         <xsl:variable name="vOutlineStr"> 
    80                                                 <!-- contains the entire outline DOM serialized for debug display --> 
    81                                                 <redirect:serialize> 
    82                                                         <xsl:apply-templates select="." mode="serialize"/> 
    83                                                 </redirect:serialize> 
    84                                         </xsl:variable> 
    85                                         <xsl:comment>navUiWidget source outline : <xsl:value-of select="$vOutlineStr"/></xsl:comment> 
     66                                        <xsl:comment>navUiWidget pathDialog : "<xsl:value-of select="$vTargetDialog"/>"</xsl:comment> 
    8667                                </xsl0:if> 
    87                                 <xsl:apply-templates select="." mode="findTarget"/> 
    88                         </xsl:template> 
    89                                  
    90                         <!-- Build target finding templates --> 
    91                         <xsl0:apply-templates select="sm:selectPage/*" mode="mkFindTarget"/> 
    92  
    93                         <!-- Build content template --> 
    94                         <xsl0:apply-templates mode="content"/> 
    95  
    96                         <!-- Stray node garbage collectors --> 
    97                         <xsl:template match="root" mode="findTarget"/> 
    98                         <xsl:template match="node()"/> 
    99  
    100                         <!-- Mode serialize : used to serialize the outline to string for debug --> 
    101                         <xsl:template match="@*|node()" mode="serialize"> 
    102                                 <xsl:copy> 
    103                                         <xsl:apply-templates select="@*|node()" mode="serialize"/> 
    104                                 </xsl:copy> 
     68                                <xsl:choose> 
     69                                        <xsl:when test="$vTargetDialog"> 
     70                                                <xsl0:apply-templates select="sm:content/sm:ifPageFound/node()" mode="content"/> 
     71                                        </xsl:when> 
     72                                        <xsl:otherwise> 
     73                                                <xsl0:apply-templates select="sm:content/sm:ifPageNotFound/node()" mode="content"/> 
     74                                        </xsl:otherwise> 
     75                                </xsl:choose> 
    10576                        </xsl:template> 
    10677 
    10778                </xsl:stylesheet> 
    108         </xsl0:template> 
    109  
    110         <!-- sm:content  mode="content" ===================================================================== --> 
    111         <xsl0:template match="sm:content" mode="content"> 
    112                 <xsl:template name="content"> 
    113                         <xsl:param name="vTargetTitle"/> 
    114                         <xsl:param name="vTargetDialog"/> 
    115                         <xsl:choose> 
    116                                 <xsl:when test="boolean($vTargetDialog)"> 
    117                                         <xsl0:apply-templates select="sm:ifPageFound/node()" mode="content"/> 
    118                                 </xsl:when> 
    119                                 <xsl:otherwise> 
    120                                         <xsl0:apply-templates select="sm:ifPageNotFound/node()" mode="content"/> 
    121                                 </xsl:otherwise> 
    122                         </xsl:choose> 
    123                 </xsl:template> 
    12479        </xsl0:template> 
    12580 
     
    163118                                </xsl0:otherwise> 
    164119                        </xsl0:choose> 
    165                         <xsl0:if test="count(sm:labelTitle) != 0"> 
     120                        <xsl0:if test="sm:labelTitle"> 
    166121                        <xsl:attribute name="title"><xsl0:apply-templates select="sm:labelTitle/node()" mode="content"/></xsl:attribute> 
    167122                        </xsl0:if> 
     
    209164        <xsl0:template match="*" mode="content"/> 
    210165 
    211         <!-- mode mkFindTarget ===================================================================== --> 
    212         <xsl0:template match="sm:step" mode="mkFindTarget"> 
    213                 <xsl0:choose> 
    214                         <xsl0:when test="sm:home"> 
    215                                 <xsl:template match="/treeContent/entry[1]" mode="findTarget"> 
    216                                         <xsl:call-template name="content"> 
    217                                                 <xsl:with-param name="vTargetTitle" select="@title"/> 
    218                                                 <xsl:with-param name="vTargetDialog" select="@dialog"/> 
    219                                         </xsl:call-template> 
    220                                 </xsl:template> 
    221                         </xsl0:when> 
    222                         <xsl0:when test="sm:last"> 
    223                                 <xsl:template match="/treeContent" mode="findTarget"> 
    224                                         <xsl:call-template name="content"> 
    225                                                 <xsl:with-param name="vTargetTitle" select="descendant::entry[last()]/@title"/> 
    226                                                 <xsl:with-param name="vTargetDialog" select="descendant::entry[last()]/@dialog"/> 
    227                                         </xsl:call-template> 
    228                                 </xsl:template> 
    229                         </xsl0:when> 
    230                         <xsl0:when test="sm:child"> 
    231                                 <xsl:template match="/treeContent" mode="findTarget"> 
    232                                         <xsl:call-template name="content"> 
    233                                                 <xsl:with-param name="vTargetTitle" select="descendant::entry[{si(sm:child/@direction='firstToLast', concat('1',si(sm:child/@offset,concat('+',sm:child/@offset),'')), concat('last()',si(sm:child/@offset,concat('-',sm:child/@offset),'')))}]/@title"/> 
    234                                                 <xsl:with-param name="vTargetDialog" select="descendant::entry[{si(sm:child/@direction='firstToLast', concat('1',si(sm:child/@offset,concat('+',sm:child/@offset),'')), concat('last()',si(sm:child/@offset,concat('-',sm:child/@offset),'')))}]/@dialog"/> 
    235                                         </xsl:call-template> 
    236                                 </xsl:template> 
    237                         </xsl0:when> 
    238                         <xsl0:otherwise> 
    239                                 <xsl:template match="entry[@position='current']" mode="findTarget"> 
    240                                         <xsl0:choose> 
    241                                                 <xsl0:when test="sm:next"> 
    242                                                         <xsl:choose> 
    243                                                                 <xsl:when test="descendant::entry[1]"> 
    244                                                                         <xsl:call-template name="content"> 
    245                                                                                 <xsl:with-param name="vTargetTitle" select="descendant::entry[1]/@title"/> 
    246                                                                                 <xsl:with-param name="vTargetDialog" select="descendant::entry[1]/@dialog"/> 
    247                                                                         </xsl:call-template> 
    248                                                                 </xsl:when> 
    249                                                                 <xsl:otherwise> 
    250                                                                         <xsl:call-template name="content"> 
    251                                                                                 <xsl:with-param name="vTargetTitle" select="following::entry[1]/@title"/> 
    252                                                                                 <xsl:with-param name="vTargetDialog" select="following::entry[1]/@dialog"/> 
    253                                                                         </xsl:call-template> 
    254                                                                 </xsl:otherwise> 
    255                                                         </xsl:choose> 
    256                                                 </xsl0:when> 
    257                                                 <xsl0:when test="sm:previous"> 
    258                                                         <xsl:choose> 
    259                                                                 <xsl:when test="not(preceding::entry[1]/@dialog) or ancestor::entry[1]/preceding::entry[1]/@dialog = preceding::entry[1]/@dialog"> 
    260                                                                         <xsl:call-template name="content"> 
    261                                                                                 <xsl:with-param name="vTargetTitle" select="ancestor::entry[1]/@title"/> 
    262                                                                                 <xsl:with-param name="vTargetDialog" select="ancestor::entry[1]/@dialog"/> 
    263                                                                         </xsl:call-template> 
    264                                                                 </xsl:when> 
    265                                                                 <xsl:otherwise> 
    266                                                                         <xsl:call-template name="content"> 
    267                                                                                 <xsl:with-param name="vTargetTitle" select="preceding::entry[1]/@title"/> 
    268                                                                                 <xsl:with-param name="vTargetDialog" select="preceding::entry[1]/@dialog"/> 
    269                                                                         </xsl:call-template> 
    270                                                                 </xsl:otherwise> 
    271                                                         </xsl:choose> 
    272                                                 </xsl0:when> 
    273                                                 <xsl0:when test="sm:nextSibling"> 
    274                                                         <xsl:call-template name="content"> 
    275                                                                 <xsl:with-param name="vTargetTitle" select="following-sibling::entry[1]/@title"/> 
    276                                                                 <xsl:with-param name="vTargetDialog" select="following-sibling::entry[1]/@dialog"/> 
    277                                                         </xsl:call-template> 
    278                                                 </xsl0:when> 
    279                                                 <xsl0:when test="sm:previousSibling"> 
    280                                                         <xsl:call-template name="content"> 
    281                                                                 <xsl:with-param name="vTargetTitle" select="preceding-sibling::entry[1]/@title"/> 
    282                                                                 <xsl:with-param name="vTargetDialog" select="preceding-sibling::entry[1]/@dialog"/> 
    283                                                         </xsl:call-template> 
    284                                                 </xsl0:when> 
    285                                                 <xsl0:when test="sm:ancestor"> 
    286                                                         <xsl:call-template name="content"> 
    287                                                                 <xsl:with-param name="vTargetTitle" select="ancestor::entry[{si(sm:ancestor/@direction='currentToTop', concat('1',si(sm:ancestor/@offset,concat('+',sm:ancestor/@offset),'')), concat('last()',si(sm:ancestor/@offset,concat('-',sm:ancestor/@offset),'')))}]/@title"/> 
    288                                                                 <xsl:with-param name="vTargetDialog" select="ancestor::entry[{si(sm:ancestor/@direction='currentToTop', concat('1',si(sm:ancestor/@offset,concat('+',sm:ancestor/@offset),'')), concat('last()',si(sm:ancestor/@offset,concat('-',sm:ancestor/@offset),'')))}]/@dialog"/> 
    289                                                         </xsl:call-template> 
    290                                                 </xsl0:when> 
    291                                         </xsl0:choose> 
    292                                 </xsl:template>  
    293                         </xsl0:otherwise> 
    294                 </xsl0:choose> 
    295         </xsl0:template> 
    296         <xsl0:template match="*" mode="mkFindTarget"/> 
    297  
    298166</xsl0:stylesheet> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_navUiWidget/navOutlineDef.xsl

    r8901 r9394  
    4949         
    5050        <xsl:param name="vComp"/> 
    51  
    52         <xsl:template match="sm:navUiWidget"> 
    53                 <outlineDef> 
    54                         <scope> 
    55                                 <xsl:apply-templates select="sm:selectPage/*"/> 
    56                         </scope> 
    57                         <result> 
    58                                 <treeContent/>   
    59                         </result> 
    60                 </outlineDef> 
    61         </xsl:template> 
    62  
    63         <xsl:template match="sm:step"> 
    64                 <xsl:apply-templates/> 
    65         </xsl:template> 
    66  
    67 <!-- minimalist --> 
    68         <xsl:template match="sm:next | sm:nextSibling | sm:previousSibling | sm:home"> 
    69                 <startingPoint dir="down" offset="0" include="y"/> 
    70                 <uncleFrom dir="down" offset="0"/> 
    71                 <uncleTo dir="up" offset="0"/> 
    72                 <currentDesc depth="1" depthFrom="current"/> 
    73         </xsl:template> 
    74  
    75 <!-- all --> 
    76         <xsl:template match="sm:previous | sm:last"> 
    77                 <startingPoint dir="down" offset="0" include="y"/> 
    78                 <uncleFrom dir="down" offset="0"/> 
    79                 <uncleTo dir="up" offset="0"/> 
    80                 <uncleDesc depth="noLimit"/> 
    81                 <currentDesc depth="noLimit"/> 
    82         </xsl:template> 
    83  
    84 <!-- stack --> 
    85         <xsl:template match="sm:ancestor"> 
    86                 <startingPoint dir="down" offset="0"/> 
    87         </xsl:template> 
    88  
    89 <!-- directChildren --> 
    90         <xsl:template match="sm:child"> 
    91                 <startingPoint dir="up" offset="0" include="n"/> 
    92                 <currentDesc depth="1" depthFrom="current"/> 
    93         </xsl:template> 
    94  
    95  
    96  
    97 <!-- TODO 
     51         
    9852        <xsl:template match="sm:navUiWidget"> 
    9953                <navOutlineDef> 
     
    157111                <excludeCompType code="{getIdFromPath(@sc:refUri)}{getAxisSuffix(@axis)}"/> 
    158112        </xsl:template> 
    159  -->     
    160113        <xsl:template match="*|text()|@*"/> 
    161114</xsl:stylesheet>