Component p: firstfaces toolbar java.lang.IllegalArgumentException no Id

0

So, any id that I put in my toolbar generates this error (test was a temporary name that I put in the id):

java.lang.IllegalArgumentException: teste
    at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:651)
    at org.primefaces.util.ComponentTraversalUtils.firstById(ComponentTraversalUtils.java:157)
    at org.primefaces.expression.SearchExpressionFacade.resolveComponentById(SearchExpressionFacade.java:489)
    at org.primefaces.expression.SearchExpressionFacade.resolveClientIds(SearchExpressionFacade.java:258)
    at org.primefaces.util.AjaxRequestBuilder.addExpressions(AjaxRequestBuilder.java:92)
    at org.primefaces.util.AjaxRequestBuilder.update(AjaxRequestBuilder.java:85)
    at org.primefaces.renderkit.CoreRenderer.buildAjaxRequest(CoreRenderer.java:389)
    at org.primefaces.component.commandbutton.CommandButtonRenderer.buildRequest(CommandButtonRenderer.java:130)
    at org.primefaces.component.commandbutton.CommandButtonRenderer.encodeMarkup(CommandButtonRenderer.java:69)
    at org.primefaces.component.commandbutton.CommandButtonRenderer.encodeEnd(CommandButtonRenderer.java:54)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
    at org.primefaces.component.toolbar.ToolbarRenderer.encodeFacet(ToolbarRenderer.java:91)
    at org.primefaces.component.toolbar.ToolbarRenderer.encodeEnd(ToolbarRenderer.java:47)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)

My xhtml:

<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
            xmlns:f="http://xmlns.jcp.org/jsf/core"
            xmlns:h="http://xmlns.jcp.org/jsf/html"
            xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
            xmlns:p="http://primefaces.org/ui"
            template="/WEB-INF/templates/Layout.xhtml">

<ui:define name="content">

    <h1 class="aw-page-title">Gerenciamento de Empresas</h1>

    <h:form id="frmEmpresa">

        <p:growl id="growl" showDetail="true" sticky="true" />

        <p:toolbar id="teste">
            <f:facet name="left">
                <p:commandButton id="btnAdicionar" value="Adicionar" icon="fa fa-fw fa-plus" actionListener="#{gerenEmpresaBean.novaEmpresa}" update=":frmEmpresa:empresaGrd :frmEmpresa:teste:btnDeletar" />
            </f:facet>

            <f:facet name="right">
                <p:commandButton id="btnDeletar" value="Deletar" icon="fa fa-fw fa-trash" disabled="#{!gerenEmpresaBean.isEditando}" onclick="PF('deletaEmpDlg').show();" />
                <p:commandButton id="btnCadastro" value="Salvar" icon="fa fa-fw fa-save" actionListener="#{gerenEmpresaBean.concluiOperacao}" 
                                 update="growl empresaGrd tblEmpresa btnDeletar"/>
            </f:facet>

        </p:toolbar>

        <p:panelGrid id="empresaGrd" columns="2" >
            <p:outputLabel for="cnpjEmpresa" value="Cnpj:" />
            <p:inputText id="cnpjEmpresa"
                         value="#{gerenEmpresaBean.cadEmpresa.cnpj}" required="true" />
            <p:outputLabel for="nomeEmpresa" value="Nome:" />
            <p:inputText id="nomeEmpresa"
                         value="#{gerenEmpresaBean.cadEmpresa.nome}" required="true"/>
        </p:panelGrid>

        <br/>
        <br/>

        <p:dataTable id="tblEmpresa" var="empresa" value="#{gerenEmpresaBean.tabela}" 
                     selection="#{gerenEmpresaBean.selecEmpresa}" selectionMode="single" rowKey="#{empresa.id}" emptyMessage="Nenhuma linha encontrada!" >

            <p:ajax event="rowSelect" 
                    listener="#{gerenEmpresaBean.selecionaLinha}" update=":frmEmpresa:empresaGrd :frmEmpresa:teste:btnDeletar" />

            <f:facet name="header">
                Empresas
            </f:facet>

            <p:column headerText="Cnpj">
                <h:outputText value="#{empresa.cnpj}" />
            </p:column>

            <p:column headerText="Nome">
                <h:outputText value="#{empresa.nome}" />
            </p:column>

        </p:dataTable>

        <p:dialog id="dlgDeletarEmpresa" widgetVar="deletaEmpDlg" header="Tem certeza?" modal="true" resizable="false">
            <p:ajax event="close" update="growl"/>
            <p>
                Se você clicar em <b>Aceito</b> você vai deletar a Empresa selecionada<br/> e todas
                as informações relacionadas a ela.
            </p>
            <p:commandButton value="Aceito" actionListener="#{gerenEmpresaBean.deletarEmpresa}" update="tblEmpresa empresaGrd" oncomplete="PF('deletaEmpDlg').hide();" />
        </p:dialog>   

    </h:form>

</ui:define>

    
asked by anonymous 14.06.2018 / 04:43

0 answers