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.<br>
<br>Having to access using FacesContext.getCurrentInstance() is so ugly.<br><br>-Dan<br><br><div class="gmail_quote">On Tue, Nov 10, 2009 at 4:07 PM, Gavin King <span dir="ltr"><<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Why do you want to access them directly? Surely that's what we're<br>
trying to get away from?<br>
<div><div></div><div class="h5"><br>
On Tue, Nov 10, 2009 at 4:02 PM, Nicklas Karlsson <<a href="mailto:nickarls@gmail.com">nickarls@gmail.com</a>> wrote:<br>
> ...and the HTTP session and request. Probably something most<br>
> frameworks will provide if nothing else.<br>
><br>
> On Tue, Nov 10, 2009 at 10:50 PM, Dan Allen <<a href="mailto:dan.j.allen@gmail.com">dan.j.allen@gmail.com</a>> wrote:<br>
>> Is the following injection going to be supported in Java EE 6?<br>
>><br>
>> @Inject FacesContext ctx;<br>
>><br>
>> Because I can't even begin to count how many times I'm going to need that<br>
>> when developing apps. Probably the #1 injection in JSF apps.<br>
>><br>
>> (True, I could make a producer method myself, but so will the n-thousand<br>
>> other JSF developers).<br>
>><br>
>> -Dan<br>
>><br>
>> --<br>
>> Dan Allen<br>
>> Senior Software Engineer, Red Hat | Author of Seam in Action<br>
>> Registered Linux User #231597<br>
>><br>
>> <a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>
>> <a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
>> <a href="http://www.google.com/profiles/dan.j.allen" target="_blank">http://www.google.com/profiles/dan.j.allen</a><br>
>><br>
>> _______________________________________________<br>
>> weld-dev mailing list<br>
>> <a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> ---<br>
> Nik<br>
> _______________________________________________<br>
> weld-dev mailing list<br>
> <a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
><br>
<br>
<br>
<br>
--<br>
</div></div><div><div></div><div class="h5">Gavin King<br>
<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a><br>
<a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>
<a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>
<a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br><a href="http://www.google.com/profiles/dan.j.allen">http://www.google.com/profiles/dan.j.allen</a><br>