Reset Managed Bean in Action Servlet?
I've searched through the forum and have came close in finding the answer however the recommended solution is not working...
How can I use this code:
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("beanName");
to reset a managed bean in an Action Servlet?
How can I get the managed bean in the Action Servlet and reset it?
I'm not after getting the HttpSession and invalidating it. I would just like to reset the managed bean in the servlet.
Thanks!
[550 byte] By [
iamleia] at [2007-11-27 9:04:14]

# 5
@RaymondDeCampo, Does resetting the managed bean same with resetting the session?@veerja, how will the bean know when to set all instaces of that class to their defaluts?Message was edited by: iamlei
# 6
> @RaymondDeCampo, Does resetting the managed
> bean same with resetting the session?
If you remove the bean from the session, using traditional servlet APIs, it will appear to JSF as an uninitialized managed bean. When the application uses it next, JSF will instantiate it and set the properties as normal.