I couldn't imagine writing a JSF application without accessing FacesContext. It's not even a matter of a perfect world vs the real world. The FacesContext was designed to be accessed. Add faces messages. Push a file. Check the value of a UIComponent for cross field validation. I'm sure I could think of many other cases.

Having to access using FacesContext.getCurrentInstance() is so ugly.

-Dan

On Tue, Nov 10, 2009 at 4:07 PM, Gavin King <gavin.king@gmail.com> wrote:
Why do you want to access them directly? Surely that's what we're
trying to get away from?

On Tue, Nov 10, 2009 at 4:02 PM, Nicklas Karlsson <nickarls@gmail.com> wrote:
> ...and the HTTP session and request. Probably something most
> frameworks will provide if nothing else.
>
> On Tue, Nov 10, 2009 at 10:50 PM, Dan Allen <dan.j.allen@gmail.com> wrote:
>> Is the following injection going to be supported in Java EE 6?
>>
>> @Inject FacesContext ctx;
>>
>> Because I can't even begin to count how many times I'm going to need that
>> when developing apps. Probably the #1 injection in JSF apps.
>>
>> (True, I could make a producer method myself, but so will the n-thousand
>> other JSF developers).
>>
>> -Dan
>>
>> --
>> Dan Allen
>> Senior Software Engineer, Red Hat | Author of Seam in Action
>> Registered Linux User #231597
>>
>> http://mojavelinux.com
>> http://mojavelinux.com/seaminaction
>> http://www.google.com/profiles/dan.j.allen
>>
>> _______________________________________________
>> weld-dev mailing list
>> weld-dev@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/weld-dev
>>
>
>
>
> --
> ---
> Nik
> _______________________________________________
> weld-dev mailing list
> weld-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
>



--



--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen