gpt4 book ai didi

java - 无法附加

to non-ClientBehaviorHolder parent

转载 作者:行者123 更新时间:2023-11-29 03:13:22 26 4
gpt4 key购买 nike

我试图在从下拉列表中选择一个值时调用一个函数。这是我的代码:

<h:form id="frmUpload" enctype="multipart/form-data">  

<p:column><h:outputText value="Select Team: " /></p:column>
<p:column>
#{' '}
<h:selectOneMenu required="true" id="ddlTeam" value="#{telesalesUpload.selectTeam}">
<f:selectItem itemValue="0" itemLabel="Dunning Team" />
<f:selectItem itemValue="1" itemLabel="SAVD Team" />
</h:selectOneMenu>
#{' '}
<p:ajax process="@this" event="change" listener="#{telesalesUpload.UpdateTeam}" />

</p:column>

<h:outputText value="Note: first row will be skipped as header row!" />
<p:fileUpload fileUploadListener="#{telesalesUpload.handleFileUpload}"
process = "ddlTeam"
auto="true"
mode="advanced"
update="messages,:frmData"
allowTypes="/(\.|\/)(csv|jpe?g|png)$/"/>
<p:growl id="messages" showDetail="true"/>

但我收到此错误:无法附加到非 ClientBehaviorHolder 父级

最佳答案

你必须输入 <p:ajax>里面<p:selectOneMenu> .

<p:column>
#{' '}
<p:selectOneMenu required="true" id="ddlTeam" value="#{telesalesUpload.selectTeam}">
<f:selectItem itemValue="0" itemLabel="Dunning Team" />
<f:selectItem itemValue="1" itemLabel="SAVD Team" />
<p:ajax process="@this" event="change" listener="#{telesalesUpload.UpdateTeam}" />
</p:selectOneMenu>
#{' '}
</p:column>

关于java - 无法附加 <p :ajax> to non-ClientBehaviorHolder parent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28019072/

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