Alguem consegue me explicar o que ta causando isso e como consigo resolver?
Erro:
/consultarV.xhtml @17,86 value="#{veiculoMbean.paraPesquisa}": Target Unreachable, identifier [veiculoMbean] resolved to null
Bean:
package beans;
import entidades.Veiculo;
import javax.inject.Named;
import javax.enterprise.context.SessionScoped;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Named(value = "veiculoMbean")
@SessionScoped
public class VeiculoMBean implements Serializable {
private Veiculo veiculo ;
private String paraPesquisa;
private List listaVeiculo = new ArrayList<>();
public VeiculoMBean() {}
public void botaoPesquisar(){
}
public void botaoSalvar (){
}
public Veiculo getVeiculo() {
return veiculo;
}
public void setVeiculo(Veiculo veiculo) {
this.veiculo = veiculo;
}
public String getParaPesquisa() {
return paraPesquisa;
}
public void setParaPesquisa(String paraPesquisa) {
this.paraPesquisa = paraPesquisa;
}
public List getListaVeiculo() {
return listaVeiculo;
}
public void setListaVeiculo(List listaVeiculo) {
this.listaVeiculo = listaVeiculo;
}
}
consultaV.xhtml:
<ui:define name="content">
<h:form>
<h1><center>Consultar Veiculo</center></h1>
<h:panelGrid>
<h:commandButton value="Novo Veiculo" action="cadVeiculo"/>
</h:panelGrid>
<h:panelGrid columns="3">
Placa <h:inputText size="20" value="#{veiculoMbean.paraPesquisa}" />
<h:commandButton value="Buscar" action="#{veiculoMbean.botaoPesquisar()}" />
</h:panelGrid>
<h:panelGrid>
<h:dataTable value="#{veiculoMbean.listaVeiculo}" var="veiculo"
styleClass="table"
headerClass="tableHeader"
rowClasses="tableOddRow,tableEvenRow">
<h:column>
<f:facet name ="header">Placa</f:facet>
RPG-1E74
</h:column>
<h:column>
<f:facet name ="header">Modelo</f:facet>
ARGO
</h:column>
<h:column>
<f:facet name ="header">Fabricante</f:facet>
FIAT
</h:column>
<h:column>
<f:facet name ="header">Acessorio</f:facet>
Carregador Universal
</h:column>
<h:column>
<f:facet name="header">Funções</f:facet>
<h:commandButton value="Editar"/>
<h:commandButton value="Apagar"/>
</h:column>
</h:dataTable>
</h:panelGrid>
</h:form>
</ui:define>