This content has been marked as final.
Show 3 replies
-
1. Re: remove beans from seam contexts
basel Jul 12, 2006 3:00 AM (in response to balamg)Try setting the variable to null:
Contexts.getSessionContext().set("user", null);
You can read more about this under section "2.1.8. Context variables" in the documentation. -
2. Re: remove beans from seam contexts
denis-karpov Jul 12, 2006 3:28 AM (in response to balamg)I think the better do like this:
Contexts.removeFromAllContexts(name);
orContexts.getSessionContext().remove(name);
because "set" does not remove variable. -
3. Re: remove beans from seam contexts
cptnkirk Jul 12, 2006 10:53 AM (in response to balamg)Setting an @In(create=true) @Out(required=false) var = null is probably the easiest way to clear a variable and have it be recreated on next invocation.
You can use the Contexts methods explicitly, but they add LOC and greater coupling to Seam internals.