<div>Hi,</div><div><br></div><div>I don't post much here but I felt obliged to comment on this thread.</div><div><br></div>I have to agree with Dan. This probably will one of the most used injections.<div><br></div><div>
The reason for injection is to be able to stub and unit test easily. Right now the getCurrentInstance() is static and you'd need to use ugly constructions to replace it with a stub (I am not saying it's impossible but I am talking here from the feedback I've gathered and personal experience when unit testing pure JSF). Note, I am talking about 'true' unit testing with no container involved.</div>
<meta charset="utf-8"><div>If faces context will be injectable it will make many people happy :)</div><div><br></div><div>Just my 2 cents...<br><div><br clear="all">Best regards,<br>Siarhei Dudzin<br>
<br><br><div class="gmail_quote">On Tue, Nov 10, 2009 at 10: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="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Why do you want to access them directly? Surely that's what we're<br>
trying to get away from?<br>
<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>
<div class="im">><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>
</div>> ---<br>
> Nik<br>
<div><div></div><div class="h5">> _______________________________________________<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>
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>
_______________________________________________<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>
</div></div></blockquote></div><br></div></div>