Pessoal estou dando um update em um formulário porem esta me retornando essa mensagem:
javax.faces.FacesException: Cannot find component with identifier "form:dataTableCadFrabricantes" referenced from "formCadastrarFab:j_idt38".
Abaixo segue o código da minha página xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.request.contextPath}/resources/css/botoes.css"/>
<title>SCER - Cadastro de fabricantes</title>
</h:head>
<h:body>
<ui:composition template="/WEB-INF/template.xhtml">
<ui:define name="conteudoPrincipal">
<p:panel header="Cadastro de fabricante">
<h:form id="form">
<p:growl id="growl" showDetail="true"/>
<p:dataTable id="dataTableCadFrabricantes" var="fabricante" value="#{fabricanteModel.fabricanteDataModel}" paginator="true" rows="10"
selection="#{fabricanteModel.selectedFabricante}" selectionMode="single">
<f:facet name="header">
Fabricantes
</f:facet>
<p:column headerText="Email">
#{fabricante.email}
</p:column>
<p:column headerText="Nome">
#{fabricante.nome}
</p:column>
<p:column headerText="Telefone" >
#{fabricante.telefone}
</p:column>
</p:dataTable>
<p:separator/>
<fieldset id="barraBotoesTelaGerenciamento">
<p:commandButton value="Cadastrar" disabled="false" oncomplete="cadFabricante.show();"/>
<p:commandButton value="Editar" disabled="false"/>
<p:commandButton value="Excluir" disabled="false"/>
<p:commandButton value="Visualizar" disabled="false" oncomplete="carDialog.show()"/>
</fieldset>
</h:form>
<h:form id="formCadastrarFab">
<p:dialog id="dlgCadastrarFab" header="Cadastrar Fabricante" widgetVar="cadFabricante" resizable="false" modal="true" minHeight="400" width="400">
<h:panelGrid id="pngCadastrar" columns="2" cellpadding="4">
<h:outputText value="Email:" />
<p:inputText value="#{fabricanteModel.selectedFabricante.email}" />
<h:outputText value="Nome:" />
<p:inputText value="#{fabricanteModel.selectedFabricante.nome}"/>
<h:outputText value="Telefone:" />
<p:inputText value="#{fabricanteModel.selectedFabricante.telefone}" />
</h:panelGrid>
<p:separator/>
<fieldset id="barraBotoes">
<p:commandButton value="OK" actionListener="#{fabricanteModel.salvar}" update="form:dataTableCadFrabricantes"/>
<p:commandButton value="Cancelar" onclick="cadFabricante.hide();"/>
</fieldset>
</p:dialog>
</h:form>
</p:panel>
</ui:define>
</ui:composition>
</h:body>
</html>
Também tenho um template abaixo segue o código do template:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.request.contextPath}/resources/css/template.css"/>
</h:head>
<h:body>
<div id="corpo">
<div id="menuTopo">
<h:form>
<p:menubar>
<p:submenu label="Cadastro Básicos" icon="ui-icon-document">
<p:menuitem value="Fornecedores" action="cadastroFornecedores" />
<p:menuitem value="Equipamentos"/>
<p:separator />
</p:submenu>
</p:menubar>
</h:form>
</div>
<div id="conteudoPrincipal">
<ui:insert name="conteudoPrincipal"></ui:insert>
</div>
<div id="rodape">
</div>
</div>
</h:body>
</html>
Se alguém puder me ajudar agradeço.