我正在使用Prime-faces的全页布局控件。我有三种布局,分别是West,East和Center。西部布局和东部是可折叠的。另外我在West布局上有一个按钮,它有一个click事件,可以用另一个x html页面改变Center布局内容。所以问题是,在点击该按钮之前,布局的折叠工作正常,但点击折叠后无法正常工作。我的X HTML代码已包含在内。任何关于那个问题的想法请与我分享。感谢。
<p:layout fullPage="true">
<p:layoutUnit header="West" position="west" resizable="true" size="200" collapsible="true" >
<h:form>
<h:commandButton value="button" action="#interfaceAjaxes.hit()}">
<f:param name="name" value="new.xhtml"/>
<f:ajax render=":form:mainContent"/>
</h:commandButton>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="east" header="East" collapsible="true" size="200">
<h:form>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="center">
<h:form id="form" style="background: transparent">
<div>
<h:panelGroup id="mainContent">
<ui:include src="#{interfaceAjaxes.mainContent}"/>
</h:panelGroup>
</div>
</h:form>
</p:layoutUnit>
</p:layout>
答案 0 :(得分:1)
我发现它,显然你只渲染加载的页面,而不是其他功能,所以使用:
<f:ajax render=":form:mainContent @all"/>
而不是:
<f:ajax render=":form:mainContent"/>
希望它有用。