我有如下的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"> alter作为<div id="graphView">

实际上,<p:outputPanel在客户端呈现了div标签。

09-11 00:55
查看更多