i try use conversation.
just annotated my method by @Begin (also try with @Create) and do redirect by return "/page.jsp"
in my method in Conversation context i see valid value
but after redirect it dissapear and conversation id is changed?
can some bidy help me?
PS i not use pages.xml, just simple @Begin and @End
<h:inputText value="#{data.value}"/> <h:commandButton value="Click me" action="#{Action.action}"/> @Name("data") @Scope(ScopeType.CONVERSATION) public class Data { private int value; public Data() { System.out.println("Data create"); } public int getValue() { return value; } public void setValue(int value) { this.value = value; } } @Name("Action") @Scope(ScopeType.SESSION) public class Action { @Logger private Log log; @Begin public String action() { System.out.println("1"); return "/test2.jsp"; } @End public String action2() { System.out.println("2"); return "/test3.jsp"; } }
You can use pages.xml to join the conversation along with the redirect.
<begin-conversation join="true/>