Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在p:datatable和p:columns中未激发带有f:ajax侦听器的h:inputTex_Java_Ajax_Jsf 2_Primefaces - Fatal编程技术网

Java 在p:datatable和p:columns中未激发带有f:ajax侦听器的h:inputTex

Java 在p:datatable和p:columns中未激发带有f:ajax侦听器的h:inputTex,java,ajax,jsf-2,primefaces,Java,Ajax,Jsf 2,Primefaces,我有这个p:dataTable <h:form id="forms" styleClass="tTablas" prependId="false"> <p:dataTable var="row" id="list" value="#{BB.dataTable}" rowIndexVar="i"> <p:column headerText="id"> <h:outputText value="#{row.id}" />

我有这个p:dataTable

<h:form id="forms" styleClass="tTablas" prependId="false">
<p:dataTable var="row" id="list" value="#{BB.dataTable}" rowIndexVar="i">
    <p:column headerText="id">
        <h:outputText value="#{row.id}" />
    </p:column>
    <p:columns var="fecha" value="#{BB.lFechaEntradaVigor}">
        <f:facet name="header">
            <h:outputText value="#{fecha}" />
        </f:facet>
        <h:outputText value="#{row.getCoste(fecha)}" styleClass="#{row.isValido(fecha)?'vigor':''}" rendered="#{!row.isUpdatable(fecha)}">
            <f:convertNumber groupingUsed="true" minFractionDigits="2" />
        </h:outputText>
        <h:inputText value="#{BB.valor}" rendered="#{row.isUpdatable(fecha)}">
            <f:convertNumber groupingUsed="true" minFractionDigits="2" />
            <f:ajax render="@this" listener="#{grupoValoracionSiaBB.changeValor(fecha, row, i)}" />
        </h:inputText>
    </p:columns>
</p:dataTable> 

我这样做是因为
p:columns
不接受
p:cellEditor
,我需要知道更新了哪些列,然后我创建了方法
changeValor(Date-fecha,Object-enitidad,Integer-fila)
并调用
f:ajax
监听器,但不触发。
有什么想法吗?

THX

您应该使用p:inputText和p:ajax,并在p:ajax标记add process=“@this”和事件中使用

您希望在提交整个
h:form
时,通过任何更改激活侦听器吗?如果您希望通过任何更改对其进行更新,请将
event=“change”
添加到
f:ajax
我添加的事件中,但不起作用您在数据表周围也有一个
h:form
,我想……是的,我在数据表周围有
h:form
我的问题是我使用Primefaces 3.5,我将版本更改为4.0我将h:inputText更改为
,但不起作用,但如果p:inputText超出数据表范围,则工作!!!!可以使用js并调用函数,但我认为这不是最好的解决方案。有什么想法吗???