Using Primefaces 6.0 Jsf 2.1 on a tomcat 7,
I am trying to use cell edition mode in primefaces datable with many input components in the same cell in input facet mode. Maybe this is not the right way to use cell edition mode, please tell me then.
Anyway, it seems to work well, except for the selectOneMenu : when I select one item, i am getting out of cell edition, whereas i would like to follow filling other inputs... The problem does not occur with inputText and calendar.
I wonder if 6.1 would correct the problem. If it does, i will not wait for 6.1 and will certainly take an Elite access.
Thanks in advance,
Code: Select all
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{smartFeeding.getTotal(tank, day).amount}"/>
</f:facet>
<f:facet name="input" >
<h:form>
<table class="no-border-table">
<tr class="no-border-header">
<td>Qté (kg)</td>
<td>Heure</td>
<td>Silo</td>
<td>Aliment</td>
<td>Trts Int.</td>
<td>Trts Ext.</td>
<td></td>
</tr>
<ui:repeat value="#{smartFeeding.getFeeding(tank, day)}" var="feeding">
<tr>
<td>
<p:inputNumber value="#{feeding.amount}" size="5" />
</td>
<td>
<p:calendar pattern="HH:mm" timeOnly="true" value="#{feeding.day}" size="5" label="Heure" />
</td>
<td>
<p:selectOneMenu style="width: 30px;">
<f:selectItem itemLabel="Silo" itemValue="" />
</p:selectOneMenu>
</td>
<td>
<p:selectOneMenu style="width: 30px;">
<f:selectItem itemLabel="Aliment" itemValue="" />
</p:selectOneMenu>
</td>
<td>
<p:selectOneMenu style="width: 30px;" value="#{smartFeeding.tmp}" converter="intTrtConverter">
<f:selectItem itemLabel="Trts Int." itemValue="" />
<f:selectItems value="#{smartFeeding.internalTreatments}" var="trt" itemLabel="#{trt.text}" />
<p:ajax partialSubmit="true" process="@this" async="true" />
</p:selectOneMenu>
</td>
<td>
<p:selectOneMenu style="width: 30px;">
<f:selectItem itemLabel="Trts Ext." itemValue="" />
<f:selectItems value="#{smartFeeding.externalTreatments}" var="trt" itemLabel="#{trt.text}" />
</p:selectOneMenu>
</td>
<td>
<p:commandButton type="button" icon="ui-icon-delete" />
</td>
</tr>
</ui:repeat>
<tr><td>
<p:commandButton type="button" icon="ui-icon-add" />
</td></tr>
</table>
</h:form>
</f:facet>
</p:cellEditor>