This content has been marked as final.
Show 3 replies
-
1. Re: Correct way to access FacesContext
gavin.king Feb 4, 2006 9:09 PM (in response to stijn.dewitt)The way you are doing it is actually perfectly OK.
A more Seamy way is to use:
@In FacesContext facesContext;
But this is really just a matter of taste. -
2. Re: Correct way to access FacesContext
stijn.dewitt Feb 6, 2006 12:12 PM (in response to stijn.dewitt)Thanks for your answer Gavin!
@In FacesContext facesContext;
Would I be correct in saying that the above code is to be used for Seam-aware components, while the standard JSF syntax is preferred for non-Seam-aware code?
[Offtopic]
I have tried a lot of different web frameworks for Java, and I wanted to try JSF for a while now, but it always seemed so complex that I postponed it...until I discovered Seam. I'm a JSF newbie as well as a Seam newbie, so if I ask JSF questions, sorry...Your 'reward' for making JSF so easy for newbies I'm afraid.. :)
[/Offtopic] -
3. Re: Correct way to access FacesContext
gavin.king Feb 6, 2006 12:30 PM (in response to stijn.dewitt)Yes, as I said, there is no problem at all with FacesContext.getCurrentInstance().