f:paramView on jsf 2 dont' work
mengueloby Nov 4, 2011 12:22 PMGood morning,
I have tree xhtml files in order to show a page:
the template MasterLayoutaff.xhtml:
[CODE]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<f:metadata>
<f:viewParam name="item" value="#{mysession.id}">
<f:event type="preRenderView" listener="#{mysession.preValidateViewParam}" />
</f:viewParam>
</f:metadata>
<h:head>
<title><ui:insert name="windowTitle"/></title>
</h:head>
<h:body>
<div id="header">
<ui:insert name="headering">
<ui:include src="/composant/header.xhtml"/>
</ui:insert>
</div>
<div id="toolbar">
<ui:insert name="toolbar">
<ui:include src="/composant/toolbar.xhtml"/>
</ui:insert>
</div>
<div id="menu">
<ui:insert name="menu">
<ui:include src="/composant/menu1.xhtml"/>
</ui:insert>
</div>
<div id="content">
<ui:insert name="content"/>
</div>
<div id="advert">
<ui:insert name="advert">
<ui:include src="/composant/advert.xhtml"/>
</ui:insert>
</div>
<div id="footer">
<ui:insert name="footer">
<ui:include src="/composant/footer.xhtml"/>
</ui:insert>
</div>
</h:body>
</html>
[/CODE]
my page:
[CODE]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<title>IGNORED</title>
</h:head>
<body >
<f:view>
<ui:composition template="./layout/MasterLayoutaff.xhtml">
<ui:define name="windowTitle">
Ongoladev:#{mysession.curpage}
</ui:define>
<ui:define name="content">
<ui:include src="groupe.xhtml"/>
</ui:define>
</ui:composition>
</f:view>
</body>
</html>
[/CODE]
the component groupe:
[CODE]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<title>IGNORED</title>
</h:head>
<body>
<ui:composition>
</ui:composition>
</body>
</html>
[/CODE]
I dont' have path problems because my page is rendered, but the parameter is not passed and I don't know why.
So what's the matter?
Thanks!!