How to update a layoutUnit in PrimeFaces

ⅰ亾dé卋堺 提交于 2019-12-23 03:14:46

问题


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

the commandLink :

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

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


回答1:


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>


来源:https://stackoverflow.com/questions/18913547/how-to-update-a-layoutunit-in-primefaces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!