PrimeFaces 3.4とFaceletsで問題が発生しました。次のFaceletsテンプレートを作成しました:
<?xml version='1.0' encoding='UTF-8' ?>
<h:head>
<h:outputStylesheet library="css" name="styles.css"></h:outputStylesheet>
</h:head>
<h:body>
<p:layout fullPage="true">
<p:layoutUnit position="north" size="200px" collapsible="true">
<ui:include src="header.xhtml"></ui:include>
</p:layoutUnit>
<p:layoutUnit position="south" size="50px" collapsible="true">
Sul
</p:layoutUnit>
<p:layoutUnit id="contentView" position="center">
<ui:insert name="content"></ui:insert>
</p:layoutUnit>
</p:layout>
</h:body>
私のindex.xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="./maintemplate.xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:define id="contentView" name="content">
<ui:include src="#{userController.currentPage}"></ui:include>
</ui:define>
</ui:composition>
したがって、userController.currentPageには、primeFacesコンポーネントで機能するログインページが最初に含まれています。header.xhtml内にあるメニューをクリックすると、次のようになります。
<p:menuitem value="Tickets" actionListener="#{userController.setCurrentPage('tickets.xhtml')}" update=":contentView" ajax="false"></p:menuitem>
中央のレイアウトをクリックすると空白になります。エラーや何かが間違っているという情報は表示されません。ページtickets.xhtmlを問題なくレンダリングできます。
どんな助けでも大歓迎です。
Netbeans7.3RC1を使用しています-ApacheTomcat7.0.34.0 / PrimaFaces 3.4 / JSF 2.1
編集:メニューにajax = "false"を入れることは機能しますが、すべてのページが更新されました。ページ全体を更新せずにこれを機能させる方法はありますが、中央のページだけを更新したいと思います。