I couldn&#39;t imagine writing a JSF application without accessing FacesContext. It&#39;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&#39;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">&lt;<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a>&gt;</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&#39;s what we&#39;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 &lt;<a href="mailto:nickarls@gmail.com">nickarls@gmail.com</a>&gt; wrote:<br>
&gt; ...and the HTTP session and request. Probably something most<br>
&gt; frameworks will provide if nothing else.<br>
&gt;<br>
&gt; On Tue, Nov 10, 2009 at 10:50 PM, Dan Allen &lt;<a href="mailto:dan.j.allen@gmail.com">dan.j.allen@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Is the following injection going to be supported in Java EE 6?<br>
&gt;&gt;<br>
&gt;&gt; @Inject FacesContext ctx;<br>
&gt;&gt;<br>
&gt;&gt; Because I can&#39;t even begin to count how many times I&#39;m going to need that<br>
&gt;&gt; when developing apps. Probably the #1 injection in JSF apps.<br>
&gt;&gt;<br>
&gt;&gt; (True, I could make a producer method myself, but so will the n-thousand<br>
&gt;&gt; other JSF developers).<br>
&gt;&gt;<br>
&gt;&gt; -Dan<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Dan Allen<br>
&gt;&gt; Senior Software Engineer, Red Hat | Author of Seam in Action<br>
&gt;&gt; Registered Linux User #231597<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>
&gt;&gt; <a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
&gt;&gt; <a href="http://www.google.com/profiles/dan.j.allen" target="_blank">http://www.google.com/profiles/dan.j.allen</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; weld-dev mailing list<br>
&gt;&gt; <a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; ---<br>
&gt; Nik<br>
&gt; _______________________________________________<br>
&gt; weld-dev mailing list<br>
&gt; <a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
&gt;<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>