java-p:autoComplete中的primefaces更新面板
作者:互联网
我有如下的p; autocomplete标记,用于填充联系人列表
<h:form id="relationshipsForm">
//code
<p:autoComplete id="contactAutoComplete"
rendered="#{relationshipController.relationshipsName=='Contact'}"
value="#{relationshipController.contactKeyWord}"
completeMethod="#{contactRelationshipController.completeContacts}"
var="contact" itemLabel="#{contact.fullName}"
itemValue="#{contact}" converter="#{contactConverter}"
forceSelection="true" size="35" scrollHeight="200"
panelStyle="width:10px;">
<p:ajax event="itemSelect" update="relationshipsForm,graphViewPanel" />
</p:autoComplete>
在选择联系人时,它应该取消更新以下标签视图
<p:outputPanel id="graphViewPanel">
<h:inputHidden id="orgViewUnMappedJSonDataList"
value="${relationshipController.getOrgViewUnMappedJSonData()}" />
<h:inputHidden id="orgViewMappedJSonDataList"
value="${relationshipController.getOrgViewMappedJSonData()}" />
<p:tabView scrollable="true" id="tabView" dynamic="true" cache="true">
<p:tab id="orgViewTab" title="Org View">
<h:outputScript library="js" name="go.js" />
<h:outputScript library="js" name="gojs_org_view.js" />
<h:outputStylesheet library="css" name="gojs_org_view.css" />
</p:tab>
</p:tabView>
</p:outputPanel>
</h:form>
解决方法:
您使用< p:outputPanel id =“ graphView”>更改< div id =“ graphView”>.
实际上,< p:outputPanel在客户端呈现了一个div标签.
标签:ajax,jsf,primefaces,java 来源: https://codeday.me/bug/20191122/2062970.html