I\'m stuck in a navigation case problem similar to this one.
In a few words, I\'m trying to redirect navigation from one page to another, using an ajax rendered h:commandL
The rendered
attribute of all input and command components is re-evaluated when the form is submitted. So if it evaluates false
, then JSF simply won't invoke the action. The Flash scope is terminated when the request/response of the search()
method is finished. It isn't there in the Flash scope anymore when you send the request of the showResult()
. I suggest to put the bean in the view scope and bind the rendered
attribute to its property instead.
@ManagedBean
@ViewScoped
public class StartBean {
private String result;
public void search(){
result = "hooray";
}
public String showResult(){
return "result?faces-redirect=true";
}
public String getResult() {
return result;
}
}
with