gpt4 book ai didi

java - 来自 p :autoComplete 的 primefaces 更新面板

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:51:09 24 4
gpt4 key购买 nike

我有 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>

在选择联系人时,它应该通过 ajax 方式更新下面的选项卡 View

<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标签。

关于java - 来自 p :autoComplete 的 primefaces 更新面板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18470402/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com