I use JSF2.0 and WELD-CDI and jboss AS7.I use CDI@ConversiationScope in page-backbean. To go to the one page, I am using the menu-item., As shown:
<rich:menuItem
label="redirect to page1"
execute="@this"
action="#{myBean.begin}"/>
In the action of this menu, the following method is called to begin conversation and then redirect to the desired page:
@Named(value = "myBean")
@ConversationScoped
public class MyBean implements Serializable {
@Inject
private Conversation conversation;
public String begin() {
if (!conversation.isTransient()) {
conversation.end();
}
conversation.setTimeout(“1800000”);
conversation.begin();
return "page1";
}
}
and faces-config.xml:
<navigation-case>
<from-outcome>page1</from-outcome>
<to-view-id>/sample/page1.xhtml</to-view-id>
<redirect/>
</navigation-case>
So far everything works great.
But if I apply again by the way, after execute conversation.end(), still no change variables and All values of variable are maintained. Why?!
after exexute "conversation.end()" ,variables-value are not reset.why variables are not reset?Please help me.