Changeset 9394
- Timestamp:
- 25.07.2007 01:11:18 (3 years ago)
- Location:
- trunk
- Files:
-
- 9 modified
-
Jav_GE/com/scenari/m/ge/agent/IWAgentOutline.java (modified) (1 diff)
-
Jav_GE/com/scenari/m/ge/agent/OutlineWalker.java (modified) (3 diffs)
-
Jav_GE/com/scenari/m/ge/agent/pages/HAgentPages.java (modified) (1 diff)
-
Jav_GE/com/scenari/m/ge/agent/scenario/HAgentScenario.java (modified) (1 diff)
-
Jav_GE/com/scenari/m/ge/donnee/WDonneeNavOutline.java (modified) (4 diffs)
-
Wsp_Modeling/es/content/uiWidget/navUiWidget/xml.xed.xml (modified) (5 diffs)
-
Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_navUiWidget.xml (modified) (2 diffs)
-
Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_navUiWidget/content.xsl.xsl (modified) (4 diffs)
-
Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_navUiWidget/navOutlineDef.xsl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Jav_GE/com/scenari/m/ge/agent/IWAgentOutline.java
r7358 r9394 21 21 */ 22 22 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; 23 30 24 31 } -
trunk/Jav_GE/com/scenari/m/ge/agent/OutlineWalker.java
r9203 r9394 63 63 64 64 } 65 66 /** 67 * Restreint les noeuds �eux qui sont mat�alis�dans le contenu. 68 */ 69 protected boolean fRestrictToMaterializedNode = false; 65 70 66 71 /** … … 912 917 913 918 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; 915 923 } 916 924 … … 1026 1034 return vPos; 1027 1035 } 1036 1037 public boolean isRestrictToMaterializedNode() { 1038 return fRestrictToMaterializedNode; 1039 } 1040 1041 public void setRestrictToMaterializedNode(boolean pRestrictToMaterializedNode) { 1042 fRestrictToMaterializedNode = pRestrictToMaterializedNode; 1043 } 1028 1044 } -
trunk/Jav_GE/com/scenari/m/ge/agent/pages/HAgentPages.java
r8541 r9394 130 130 return false; 131 131 } 132 133 public boolean isMaterialized(IHDialog pDialog) throws Exception { 134 return true; 135 } 136 132 137 } -
trunk/Jav_GE/com/scenari/m/ge/agent/scenario/HAgentScenario.java
r7467 r9394 100 100 return hGetIntitule(pDialog).length() == 0; 101 101 } 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 } 102 123 } -
trunk/Jav_GE/com/scenari/m/ge/donnee/WDonneeNavOutline.java
r9023 r9394 152 152 if (fIncludeCompType != null) { 153 153 if(fCompTypeAllowed) { 154 String vCd = pWalker.getAgent().hGetComposant().hGetComposant Type().hGetCode();154 String vCd = pWalker.getAgent().hGetComposant().hGetComposantPrincipal().hGetComposantType().hGetCode(); 155 155 for (int i = 0; i < fIncludeCompType.length; i++) { 156 156 if (vCd.equals(fIncludeCompType[i])) return true; … … 158 158 return false; 159 159 } else { 160 String vCd = pWalker.getAgent().hGetComposant().hGetComposant Type().hGetCode();160 String vCd = pWalker.getAgent().hGetComposant().hGetComposantPrincipal().hGetComposantType().hGetCode(); 161 161 for (int i = 0; i < fIncludeCompType.length; i++) { 162 162 if (vCd.equals(fIncludeCompType[i])) return false; … … 268 268 return true; 269 269 } else { 270 String pUrl = pWalker.getDialogUrl();271 270 if (!pWalker.gotoPrevious()) return false; 272 while (!isEntryAllowed(pWalker) || pUrl.equals(pWalker.getDialogUrl())) {271 while (!isEntryAllowed(pWalker)) { 273 272 if (!pWalker.gotoPrevious()) return false; 274 273 } … … 415 414 super(); 416 415 fWalker = new OutlineWalker(); 416 fWalker.setRestrictToMaterializedNode(true); 417 417 fWalker.setCurrDesc(OutlineWalker.NO_LIMIT, OutlineWalker.FROM_STARTINGPOINT); 418 418 fWalker.setUncleFrom(OutlineWalker.DIR_UP_DOWN, 0); -
trunk/Wsp_Modeling/es/content/uiWidget/navUiWidget/xml.xed.xml
r8919 r9394 105 105 <xul:alternativeAlone se:bind="choice" se:defaultChild="-1"> 106 106 <xul:element se:id="direction" se:name="sm:next" se:bind="element" forcefilled="true"> 107 <!--<xul:childs>107 <xul:childs> 108 108 <xul:alternative se:id="models" se:bind="choice"> 109 109 <xul:list se:bind="current" se:name="sm:includeModel"> … … 121 121 </xul:list> 122 122 </xul:alternative> 123 </xul:childs> -->123 </xul:childs> 124 124 </xul:element> 125 125 <se:ref se:name="sm:previous" se:refid="direction"/> … … 154 154 </xul:attribute> 155 155 </xul:atts> 156 <!--<xul:childs>156 <xul:childs> 157 157 <se:ref se:refid="models"/> 158 </xul:childs> -->158 </xul:childs> 159 159 </xul:element> 160 160 <xul:element se:id="point" se:name="sm:home" se:bind="element" forcefilled="true"/> … … 163 163 </xul:childs> 164 164 </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="?"> 166 166 <xul:childs> 167 167 <se:ref se:refid="sm:step"/> … … 169 169 </xul:childs> 170 170 </xul:element> 171 <xul:insert se:bind="current"/> -->171 <xul:insert se:bind="current"/> 172 172 </xul:childs> 173 173 </xul:element> -
trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_navUiWidget.xml
r8898 r9394 66 66 <source type="inclusion-dynamique"> 67 67 <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> 70 72 ]]></source> 71 73 </source> 72 74 </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"> 77 76 <urlPage type="xpathOnSrc-dynamique">concat('bs.doss/_common/wdgt/', @code, '/nav.xsl')</urlPage> 78 77 <page> … … 80 79 </page> 81 80 </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 90 85 <!-- @API Retourne l'occurence d'une zone. Valeur retourn�: 91 86 One -
trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_navUiWidget/content.xsl.xsl
r9143 r9394 52 52 <xsl0:param name="vDialog"/> 53 53 <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 -->70 54 71 55 <xsl0:template match="sm:navUiWidget"> … … 74 58 <xsl:param name="vDialog"/> 75 59 <xsl:param name="vAgent"/> 60 61 <xsl:variable name="vTargetDialog" select="resultatAgent(pathDialog)"/> 62 <xsl:variable name="vTargetTitle" select="si($vTargetDialog, intituleAgent(dialog($vTargetDialog)), '')"/> 76 63 77 <xsl:template match=" treeContent">64 <xsl:template match="*"> 78 65 <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> 86 67 </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> 105 76 </xsl:template> 106 77 107 78 </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>124 79 </xsl0:template> 125 80 … … 163 118 </xsl0:otherwise> 164 119 </xsl0:choose> 165 <xsl0:if test=" count(sm:labelTitle) != 0">120 <xsl0:if test="sm:labelTitle"> 166 121 <xsl:attribute name="title"><xsl0:apply-templates select="sm:labelTitle/node()" mode="content"/></xsl:attribute> 167 122 </xsl0:if> … … 209 164 <xsl0:template match="*" mode="content"/> 210 165 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 298 166 </xsl0:stylesheet> -
trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_navUiWidget/navOutlineDef.xsl
r8901 r9394 49 49 50 50 <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 98 52 <xsl:template match="sm:navUiWidget"> 99 53 <navOutlineDef> … … 157 111 <excludeCompType code="{getIdFromPath(@sc:refUri)}{getAxisSuffix(@axis)}"/> 158 112 </xsl:template> 159 -->160 113 <xsl:template match="*|text()|@*"/> 161 114 </xsl:stylesheet>