我有磷;自動完成標籤作爲低於該填充的聯繫人列表primefaces從對更新面板:自動完成
<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>
在選擇應該ajaxically更新標籤下面視圖
<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>
我改變了div來
和我改變號碼:AJAX爲< p:ajax event =「itemSelect」update =「relationshipsForm,warningDialog,graphViewPanel」/>但仍然面板不刷新@RongNK – RanPaul
@RanPaul您嘗試更改'rendered =「#{relationshipController.relationshipsName =='Contact'} 「'to'rendered =」true「'。 –