Uncaught Typeerror: Cannot read Property 'Settings' of Undefined

Asked

Viewed 105 times

1

I have a problem when I click on a button that is a approve button, every time I click on the button gives this question title error, this error only happens because I have these two grid below in the code, If I take one it no longer gives this mistake I don’t know what might be going on, does anyone have a light? I have checked if it can be identical id’s or other things can not find anything that can be.

<div id="tabsCandidatos">
    <ul>
        <li><a href="#tabCandidatosInternos">Candidatos Internos</a></li>
        <li><a href="#tabCandidatosExternos">Candidatos Externos</a></li>
    </ul>
    <div>

        <div id="tabCandidatosInternos">

            <br/><br/><br/>

            <div>

                <h:form id="formCandidatoInterno">
                   <p:growl id="msgsCandidatoInterno" showDetail="true"/>

                   <p:dataTable id="dataTableCandidatoInterno" 
                                widgetVar="listaCandidatoInterno" 
                                var="candidatoInterno" 
                                value="#{candidatoInternoView.listaCandidatoInterno}" 
                                editable="true" 
                                style="margin-bottom:20px"
                                resizableColumns="true" 
                                liveResize="false">

                       <f:facet name="header">
                           Funcionários
                       </f:facet>

                       <p:ajax event="rowEdit" listener="#{candidatoInternoView.onRowEdit}" update=":formCandidatoInterno:msgsCandidatoInterno, listaCandidatoInterno"/>
                       <p:ajax event="rowEditCancel" listener="#{candidatoInternoView.onRowCancel}" update=":formCandidatoInterno:msgsCandidatoInterno, listaCandidatoInterno"/>

                       <p:column headerText="Matricula" style="width:150px">
                           <p:cellEditor>
                               <f:facet name="output">
                                   <p:autoComplete minQueryLength="3" value="#{candidatoInterno.matricula}" completeMethod="#{candidatoInternoView.pesquisaPorNomeFuncionario}" effect="fade" update=":formCandidatoInterno:msgsCandidatoInterno" style="width:100px">
                                      <p:ajax event="itemSelect" listener="#{candidatoInternoView.selectRowCandidatoInterno(candidatoInterno)}" update=":formCandidatoInterno:dataTableCandidatoInterno, :formCandidatoInterno:msgsCandidatoInterno, listaCandidatoInterno"/>
                                   </p:autoComplete>
                               </f:facet>
                               <f:facet name="input">
                                   <p:autoComplete minQueryLength="3" value="#{candidatoInterno.matricula}" completeMethod="#{candidatoInternoView.pesquisaPorNomeFuncionario}" effect="fade" update=":formCandidatoInterno:msgsCandidatoInterno">
                                      <p:ajax event="change" listener="#{candidatoInternoView.selectRowCandidatoInterno(candidatoInterno)}" update=":formCandidatoInterno:dataTableCandidatoInterno, :formCandidatoInterno:msgsCandidatoInterno, listaCandidatoInterno"/>
                                   </p:autoComplete>
                               </f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column headerText="Data de Admissão">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoInterno.dataAdmissao}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoInterno.dataAdmissao}" style="width:100%" label="Data de Admissão" disabled="true"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column headerText="Empresa">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoInterno.nomeEmpresa}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoInterno.nomeEmpresa}" style="width:100%" label="Empresa" disabled="true"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column headerText="Centro de Custo">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoInterno.nomeCentroCusto}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoInterno.nomeCentroCusto}" style="width:100%" label="Centro de Custo" disabled="true"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column headerText="Cargo">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoInterno.nomeCargo}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoInterno.nomeCargo}" style="width:100%" label="Cargo" disabled="true"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column headerText="Tipo">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoInterno.nomeTipo}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoInterno.nomeTipo}" style="width:100%" label="Tipo" disabled="true"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column headerText="Salário">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoInterno.salario}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoInterno.salario}" style="width:100%" label="Salário" disabled="true"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                        <p:column headerText="Data Prevista">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoInterno.dataPrevista}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoInterno.dataPrevista}" style="width:100%" label="Data Prevista"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column headerText="Gerar Substituição">
                            <p:cellEditor>
                               <f:facet name="output">
                                    <p:commandButton value="Gerar" styleClass="ui-priority-primary"/>
                                </f:facet>
                               <f:facet name="input">
                                    <p:commandButton value="Gerar" styleClass="ui-priority-primary"/>
                                </f:facet>
                            </p:cellEditor>
                       </p:column>

                       <p:column style="width:32px">
                           <p:rowEditor />
                       </p:column>
                   </p:dataTable>

                    <div class="ui-g">
                        <div class="ui-g-12">
                            <p:commandButton value="Novo Registro" styleClass="ui-priority-primary" process="@this" update=":formCandidatoInterno:msgsCandidatoInterno, listaCandidatoInterno"
                                             actionListener="#{candidatoInternoView.onAddNew()}" oncomplete="PF('listaCandidatoInterno').addRow();"/>
                        </div>
                    </div>

                </h:form>

                <p:inputText id="listaCandidatoInterno" name="listaCandidatoInterno" value="#{candidatoInternoView.listaCandidatoInternoToJSON}" type="hidden">
                    <p:ajax/>
                </p:inputText>

            </div>

        </div>

        <div id="tabCandidatosExternos">

            <br/><br/><br/>

            <div>
                <h:form id="formCandidatoExterno">
                   <p:growl id="msgsCandidatoExterno" showDetail="true"/>

                   <p:dataTable id="dataTableCandidatoExterno" 
                                widgetVar="listaCandidatoExterno" 
                                var="candidatoExterno" 
                                value="#{candidatoExternoView.listaCandidatoExterno}" 
                                editable="true" 
                                style="margin-bottom:20px"
                                resizableColumns="true" 
                                liveResize="false">

                       <f:facet name="header">
                           Funcionários
                       </f:facet>

                       <p:ajax event="rowEdit" listener="#{candidatoExternoView.onRowEdit}" update=":formCandidatoExterno:msgsCandidatoExterno, listaCandidatoExterno"/>
                       <p:ajax event="rowEditCancel" listener="#{candidatoExternoView.onRowCancel}" update=":formCandidatoExterno:msgsCandidatoExterno, listaCandidatoExterno"/>

                       <p:column headerText="Nome">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoExterno.nomePessoa}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoExterno.nomePessoa}" style="width:100%" label="Nome"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column headerText="Email">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoExterno.email}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoExterno.email}" style="width:100%" label="Email"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column headerText="Telefone">
                           <p:cellEditor>
                               <f:facet name="output"><h:outputText value="#{candidatoExterno.telefone}" /></f:facet>
                               <f:facet name="input"><p:inputText value="#{candidatoExterno.telefone}" style="width:100%" label="Telefone"/></f:facet>
                           </p:cellEditor>
                       </p:column>

                       <p:column style="width:32px">
                           <p:rowEditor />
                       </p:column>
                   </p:dataTable>

                    <div class="ui-g">
                        <div class="ui-g-12">
                            <p:commandButton value="Novo Registro" styleClass="ui-priority-primary" process="@this" update=":formCandidatoExterno:msgsCandidatoExterno, listaCandidatoExterno"
                                             actionListener="#{candidatoExternoView.onAddNew()}" oncomplete="PF('listaCandidatoExterno').addRow();"/>
                        </div>
                    </div>

                </h:form>

                <p:inputText id="listaCandidatoExterno" name="listaCandidatoExterno" value="#{candidatoExternoView.listaCandidatoExternoToJSON}" type="hidden">
                    <p:ajax/>
                </p:inputText>
            </div>

        </div>
    </div>
</div>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.