autoComplete completeMethod在对话框中不起作用

时间:2011-09-03 08:12:31

标签: java jsf primefaces facelets

我写了这段代码:

<p:dialog header="Bolletta" width="800" height="600">
      <h:form id="newBillForm" >

            <p:panel header="Dati fiscali">

                <h:panelGrid columns="4">

                    <h:outputLabel value="Cliente *: " for="customer"/>
                    <p:autoComplete id="customer" value="#{billController.customerString}" completeMethod="#{customerController.autoComplete}" required="true"/>

                </h:panelGrid>

            </p:panel>
      </h:form>
</p:dialog>

如果我将表单(及其所有内容)放在对话框之外,则completeMethod工作正常,但在对话框中它不起作用!

知道该怎么做吗?

1 个答案:

答案 0 :(得分:2)

这可能有很多可能的原因,常见的原因是嵌套<h:form>组件或在输入上使用rendered属性或在表单提交期间评估false的父项之一。有关它们的详细概述,请查看commandButton/commandLink/ajax action/listener method not invoked or input value not updated