Pessoal, não to conseguindo passar o bean em uma requisição, lembrando que o scope do bean tem que ser request.
o JSP:
<%@ page contentType="text/html; charset=Cp1252" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Cp1252"/>
<title></title>
</head>
<body>
<f:view>
<t:saveState id="testeBean" value="#{testeBean}" />
<h:form>
<h:outputText id="testeId" value="#{testeBean.nome}" />
<h:commandButton action="#{testeBean.testando}" />
</h:form>
</f:view>
</body>
</html>
o BEAN:
public class TesteBean {
private String nome;
public TesteBean() {
System.out.println("PASSOU PELO CONSTRUTOR");
this.nome = "Victor";
}
public String testando() {
String retorno;
retorno = "manter";
return retorno;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
}
Eu gostaria de ao acionar o botao da tela de teste, não deveria passar pelo construtor novamente, e isso não está acontecendo.