0
I’m trying to do a postBack on my project only I’m not getting it.
When I submit the form it continues to select without precision. That is, it was in the same way
public class FacesUtil {
/**
* Método que avalia se é postBack.
* @return
*/
public boolean isPostback(){
return FacesContext.getCurrentInstance().isPostback();
}
/**
* Método que nega o PostBack
* @return
*/
public static boolean isNotPostBack(){
return !isNotPostBack();
}
}
meuBean
public void inicializar() {
System.out.println("Inicializando Cadastro de Carro...");
if(FacesUtil.isNotPostBack()){
modeloCarros = modeloCarroService.buscarTodos();
}
if (this.carro == null) {
limpar();
}
}