Hello,
I have a manage bean (named "fooBean") declared in faces-config.xml, and tried to get the JSF managed bean instance for a request/response cycle when a commandButton is clicked.
The code:
FacesContext context = FacesContext.getCurrentInstance();
FooBean bean = (FooBean)context.getApplication ().getVariableResolver().resolveVariable(context, "fooBean");
FooBean bean = (FooBean)context.getApplication ().getVariableResolver().resolveVariable(context, "fooBean");
During Invoke Application phase, the fooBean was one instance. However when the cycle went to Render phase,
FacesContext.getCurrentInstance() had a different value, and returned a new fooBean instance.
Is this a bug? FacesContext instance: one per Http request( or per thread) ?
I need to have the same fooBean
instance for the whole request/response cycle.
I am using MyFaces 1.1.4. and Tomahawk 1.1.3.
Any help will be appreciated.
Thanks.
Dave
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.

