[jboss-user] [JBoss Seam] - facelet template menu conversation propagation
trickyvail
do-not-reply at jboss.com
Mon Sep 10 13:03:43 EDT 2007
If you are using a facelets template which displays common menu links on every page you may require a different conversation propagation attribute value within the links depending on the view.
In your view page when you want to change the default propagation of the menu items set the propagation type in a ui:param tag:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| template="layout/template.xhtml"
| >
|
| <ui:param name="menuPropagation" value="end"/>
| <ui:define name="body">
| <h1>Some View</h1>
| </ui:define>
| </ui:composition>
In the menu template create two links for each item one for when the propagation is not set and the other for when it is:
<div
| xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| id="menu"
| >
| <s:link
| rendered="#{menuPropagation == null}"
| view="/home.xhtml"
| value="Home"
| />
| <s:link
| rendered="#{menuPropagation != null}"
| view="/home.xhtml"
| value="Home"
| propagation="#{menuPropagation}"
| />
|
| <s:link
| rendered="#{menuPropagation == null}"
| view="/nextMenuItem.xhtml"
| value="nextMenuItem"
| />
| <s:link
| rendered="#{menuPropagation != null}"
| view="/nextMenuItem.xhtml"
| value="NextMenuItem"
| propagation="#{menuPropagation}"
| />
|
| <!-- etc ... -->
| </div>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082710#4082710
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082710
More information about the jboss-user
mailing list