Uncaught TypeError: Cannot read property 'validationFailed' of undefined

Viewed 83

Iam trying to use tab key on cell Editor in dataTable of Primefaces 6.2. On click of tab key for last row in my dataTable i get the following error message in my console

 Uncaught TypeError: Cannot read property 'validationFailed' of undefined

Below is my code

  <p:dataTable id="dtSalsLst" 
                         value="#{userEnrollmentService.salesmenMstList}" 
                         selection="#{userEnrollmentService.selectdSalmenMstList}"
                         filteredValue="#{userEnrollmentService.filteredSalmenMstList}"                          
                         scrollable="true"
                         var="salsTm" widgetVar="SlsTm"                        
                         emptyMessage="No #{custom.labels.get('IDS_SALES_TEAM')} found."  
                         paginator="true"     
                         rowSelectMode="add"
                         paginatorAlwaysVisible="true" 
                         class="tblmain"
                         rows="10" rowKey="#{salsTm.smanId}" 
                         editable="true" editMode="cell"                          
                         tableStyle="table-layout:auto" resizableColumns="true"
                         >
                <p:ajax event="rowSelect" />
                <p:ajax event="toggleSelect"  />
                <p:ajax event="rowSelectCheckbox"  />
                <p:ajax event="rowUnselectCheckbox" />
                <p:ajax event="rowUnselect"  />

            <p:column  selectionMode="multiple" style="width:50px;text-align: center"/>

            <p:column id="colSlstm" headerText="#{custom.labels.get('IDS_SALES_TEAM')}" filterBy="#{salsTm.smanName}" sortBy="#{salsTm.smanName}" filterMatchMode="contains"  >
                <p:outputLabel  id="otptLblSmanName" value="#{salsTm.smanName}"  />
            </p:column>
            <p:column id="colCompSplit" headerText="Company split">
                #{salsTm.smanCompanySplit}
            </p:column>
            <p:column id="colRepPct" headerText="Rep %" >
                <p:cellEditor >
                    <f:facet name="output">
                        <h:outputText  value="#{salsTm.repPct}" />
                    </f:facet>
                    <f:facet name="input">
                        <!--Feature #6659: User Onboard: Setup Sales Team   21/01/22 by harshithad-->
                        <p:inputNumber id="inptTxtRepPct" value="#{salsTm.repPct}" maxlength="5"  decimalPlaces="2" maxValue="100">
                            <p:ajax process="@this" event="change" 
                                    update="frmSlsList:dtSalsLst" />
                            <!--<f:convertNumber type="number"  maxFractionDigits="2" groupingUsed="true" maxIntegerDigits="15" />-->
                        </p:inputNumber>
                    </f:facet>

                </p:cellEditor>
            </p:column>

        </p:dataTable>

I also get this java Exception in terminal where i build the application.

 java.lang.NumberFormatException: For input string: "undefined"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:580)
        at java.lang.Integer.parseInt(Integer.java:615)
        at org.primefaces.component.datatable.feature.CellEditFeature.encode(CellEditFeature.java:38)
        at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:87)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)
        at javax.faces.

Below I have attached the images of error message in my console.

Error Message

0 Answers
Related