Forums Register Login
Getting instance of FacesContext
Does anyone know if I can and if so how to get an instance of the FacesContext in one of my JavaBeans?
Validation seems to send the FacesContext as an argument, but I need to get this outside of the validation is that is possible.
Originally posted by David Parry:

The method mentioned by Dave is a good way to get an instance of the FacesContext in one of your JavaBeans. Since that method is a static method of FacesContext class itself, you can get the current instance outside of the validation.

FacesContext.getCurrentInstance() is used to return the FacesContext instance from the HTTP request, which is being processed by the current thread of the application.

Hope it helps...
I figured all this out a long time ago. I guess I should remember to update my old posts when I do solve them. Oops. Thanks for the answers anyway.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

All times above are in ranch (not your local) time.
The current ranch time is
Dec 14, 2017 18:07:16.