I start with the page "blabla.page1?id=8"
In that page I need to get some input from user and execute some task (with web service - doesn't matter so much)
page1 is managed by bean1 (which declared as @RequestScoped) which contains values according to the given ID.
I want that the user will have to click a button before the task will be preformed, then
he will be moved to page2 where the result of the task will be printed as well as some
other values of bean1.
What I have now is:
<h:form> Enter code
<h:inputText value="#{bean1.input}" />
<h:commandButton value="go" action="#{bean1.task}"/>
</h:form>
and
public String sendCode()
{
...
return "page2?faces-redirect=true"
}
The outcome is:
The result of the task is printed but the picutre is of the defualt item since the content of bean1 is erased (I believe it is because the request is finished or something).
Suggestions?