Mathew Rock
Mathew Rock

Reputation: 989

h:inputTex with f:ajax listener not fired in p:datatable and p:columns

I have this 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> 

</h:form>

I did dataTable in this way because p:columns do not accept p:cellEditor and I need to know what column is updated, then I have created method changeValor(Date fecha, Object enitidad, Integer fila) and I call in f:ajax listener but do not fired.
Any Idea???
THX

Upvotes: 1

Views: 396

Answers (1)

Damian S.
Damian S.

Reputation: 149

You should use p:inputText and p:ajax and in p:ajax tag add process="@this" and event.

Upvotes: 1

Related Questions