本文介绍了如何在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.1PrimeFaces 3.5
JSF 2.1PrimeFaces 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>
这篇关于如何在PrimeFaces中更新layoutUnit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!