3

以下のように、連絡先のリストを作成する 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> 

連絡先を選択すると、下のタブ ビューが 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>
4

3 に答える 3

1

<p:outputPanel id="graphView">alter for を使用し<div id="graphView">ます。

実際、クライアント側でタグを<p:outputPanelレンダリングします。div

于 2013-08-27T16:19:10.103 に答える
1

値の選択時にオートコンプリート自体を更新するのはなぜですか? 情報を表示したい他のコンテンツを更新する必要があります。RongNK が言ったように、p:outputPanel を id で使用するか、h:outputPanel を id で使用して更新します。

その後、p:ajax から id を参照できます。

于 2013-08-27T16:24:58.393 に答える
1

タブビューの ID をコンポーネント ID のリストに追加して、オートコンペルト内の ajax を更新します。

于 2013-08-27T16:10:55.233 に答える