【发布时间】:2015-12-08 07:54:48
【问题描述】:
我尝试使用 backbean 更新面板来更新它,因为
one.xhtml
.....
<h:form>
<p:panel id="contentPanel">
.....
<ui:include src="#{main.pagePath}/>
</p:panel
</h:form>
两个.xhtml
.......
<h:form>
....
<p:commandButton id="save" action="#{user.saveAction} update=currentpanel,:#{p:component('contentPanel')}/>
</h:form>
在此更新中 saveButton 验证失败需要更新当前面板但它也更新 contentPanel 所以我尝试使用 backbean 来更新
user.java
public String saveAction()
{
if(validateFiled)
{
....
.....
RequestContext.getCurrentInstance.update('contentPanel');
}
return null;
}
但更新面板需要更多时间
【问题讨论】:
-
update=currentpanel,:#{p:component('contentPanel')}/ 解释一下这个corect c/p
标签: jsf-2 primefaces