wizard in JSF using savestate or keepalive
Hello everyone,
I want to implement wizard in my application. In that on one page i have a datatable, this datatable has one column as checkbox. I go to this page using next button and i select some checkboxes then i go back or to next page. After that if i come back to this page using prev/next button i should see all the selected and unselected checkboxes as the were.
I tried using savestate but its not working properly. Please help me to get through this.
Thanks.
[496 byte] By [
sonal_ka] at [2007-11-26 16:11:09]

# 4
You want to store values in session (save state), but you can't use session?
Please think about it twice ;) Well, here are some suggestions:
1) Split the backing beans in one request scoped bean for page actions and one session scoped bean for session data (the checkbox list for example).
2) Use FacesContext.getCurrentInstance().getExternalContext().getSessionMap() to retrieve and store the checkbox list in, instead of a bean property.
public class MyBean {
public List getCheckboxList() {
return ext.getSessionMap().get("MyBeanCheckboxList");
}
public void setCheckboxList(List checkboxList) {
ext.getSessionMap().put("MyBeanCheckboxList", checkboxList);
}
}