onCellEdit事件返回Null

时间:2014-06-11 15:03:13

标签: jsf java-ee primefaces

<p:contextMenu for="listaHorarioPermanente" widgetVar="cMenu">   
                                <p:menuitem value="Edit Cell" icon="ui-icon-search" onclick="PF('cellCars').showCellEditor();return false;"/>  
                                <p:menuitem value="Hide Menu" icon="ui-icon-close" onclick="PF('cMenu').hide()"/>  
                            </p:contextMenu>

                            <p:dataTable id="listaHorarioPermanente" var="horario" value="#{horarioPermanenteMB.listaHorarioPermanente}" editable="true" editMode="cell" widgetVar="cellCars">
                                <f:facet name="header">
                                    Horários
                                </f:facet>
                                <p:ajax event="cellEdit" listener="#{horarioPermanenteMB.onCellEdit}" update=":form" process="@form"  immediate="true"/>

                                <p:column headerText="Dia da Semana">
                                    <h:outputText value="#{horario.diaSemana}" />       
                                </p:column>

                                <p:column headerText="Hora da Entrada">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                            <h:outputText value="#{horario.horaEntradaAcesso}" />
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:inputText id="horaEntrada" value="#{horario.horaEntradaAcesso}" style="width:96%"/>
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>

                                <p:column headerText="Hora da Saída">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                            <h:outputText value="#{horario.horaSaidaAcesso}" />
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:calendar value="#{horario.horaSaidaAcesso}" pattern="HH:mm" timeOnly="true" />
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>

                                <p:column headerText="Tolerância Entrada">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                            <h:outputText value="#{horario.horaToleranciaEntradaAcesso}" />
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:calendar value="#{horario.horaToleranciaEntradaAcesso}" pattern="HH:mm" timeOnly="true" />
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>

                                <p:column headerText="Tolerância Saída">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                            <h:outputText value="#{horario.horaToleranciaSaidaAcesso}" />
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:calendar value="#{horario.horaToleranciaSaidaAcesso}" pattern="HH:mm" timeOnly="true" />
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>
                            </p:dataTable>

这是我的dataTable,当我尝试将列的值设置为Entitiy值时,onCellEdit事件返回null ....

我不想使用托管bean字段来处理此事件。 我需要帮助

0 个答案:

没有答案