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
您应该使用p:inputText和p:ajax并在p:ajax标记中添加process =“ @ this”和event。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.