When navigating from one page to another the doesn t update in my pages. Can anyone tell me why?
The setup:
页: 1
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
<ui:insert name="stuffToInclude">
</ui:insert>
</h:head>
<h:body>
....
</h:body>
页: 1
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<ui:composition template="/a.xhtml">
<ui:define name="stuffToInclude">
<meta name="description" content="pierre" />
<title>
<ui:insert name="title"/>
</title>
</ui:define>
</h:head>
页: 1
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</h:head>
<h:body>
<ui:composition template="/b.xhtml">
<ui:define name="title">
<ice:outputText id="title" nospan="true" value="C Title" />
</ui:define>
.....
</h:body>
</html>
浏览到C.jsf页就是这样:
FacesContext.getCurrentInstance().getViewRoot().setViewId("c.xhtml");
The problem is that the "TITLE" element does not update to the new title. It keeps the value from the first page that I was on before going to c.xhtml. It seems that the whole "HEAD" element isn t loaded for the new page. Suggestions?
感谢