如何在PrimeFaces中更新layoutUnit

如何在PrimeFaces中更新layoutUnit

问题描述:

我尝试通过"commandLink"在"layoutUnit"中加载一个include文件,但什么也没有显示,但是如果刷新页面,则一切正确.

I try to load an include in a "layoutUnit" via "commandLink" but nothing is displayed but if i refreshes the page all is correct.

commandLink:

the commandLink :

<p:commandLink update=":center" actionListener="#{sidePviewTest.sideBarAction}" value="Center1">
    <f:param name="pageViewId" value="center1" />
</p:commandLink>

layoutUnit:

the layoutUnit :

<p:layoutUnit id="center" position="center">
    <ui:include src="#{sidePviewTest.includedPage}" />
</p:layoutUnit>

我不明白问题是什么. 有什么想法吗?

I do not understand what the problem is. Any ideas ?

JSF 2.1 PrimeFaces 3.5

JSF 2.1 PrimeFaces 3.5

我找到了如何正确显示内容的方法. 我添加了一个面板,然后刷新它而不是布局.

I found how to display correctly the content. I added a panel and I refreshes it instead of the layout.

<p:commandLink update=":myPanel" actionListener="#{sidePviewTest.sideBarAction}" value="Center1">
    <f:param name="pageViewId" value="center1" />
</p:commandLink>

<p:layoutUnit id="center" position="center">
    <p:panel id="myPanel">
    <ui:include src="#{sidePviewTest.includedPage}" />
    </p:panel>
</p:layoutUnit>