<html><body bgcolor="#FFFFFF"><div>Thanks for the douse I&#39;m going to test this right away.<br><br><div>Antoine Sabot-Durand</div></div><div><br>Le 16 mars 2011 à 18:29, Dan Allen &lt;<a href="mailto:dan.j.allen@gmail.com">dan.j.allen@gmail.com</a>&gt; a écrit :<br>
<br></div><div></div><blockquote type="cite"><div>You can create a producer that aliases a name to a property, like this:<div><br></div><div>@Produces @Named</div><div>public Hotel getHotel() { return booking.getHotel(); }</div>
<div><br></div><div>#{hotel}</div><div><br></div>

<div>You can also use a producer field, like so:</div><div><br></div><div>@Produces @Named</div><div>private Hotel hotel;</div><div><br></div><div>#{hotel}</div><div><br></div><div>Produces sort of turns outjection on it&#39;s head. But if you think about it, it&#39;s a better way to go about it because it&#39;s more robust to read the state of the model as it is, then try to shift the information around into variables from which to read them, as outjection did.</div>


<div><br></div><div>What you can&#39;t do is use the same variable name to refer to state on two different models, unless of course your producer method does some conditional logic (saying if this screen, give this result, if this screen, give a different result). But again, that&#39;s a good thing because then tooling can actually tell you where the data is coming from.</div>


<div><br></div><div>This is a key topic for the migration guide. Feel free to contribute examples of how you might solve an outjection scenario with produces. It&#39;s a good exercise anyway.</div><div><br></div><div>-Dan<br>


<br><div class="gmail_quote">On Wed, Mar 16, 2011 at 13:03, Ken Finnigan <span dir="ltr">&lt;<a href="mailto:ken@kenfinnigan.me"><a href="mailto:ken@kenfinnigan.me">ken@kenfinnigan.me</a></a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<div bgcolor="#FFFFFF"><div>If you want the result of @Produces to be EL accessible just throw a @Named on it.</div><div><br></div><div>Ken<br><br>Sent from my iPhone</div><div><div></div><div class="h5"><div><br>On Mar 16, 2011, at 13:02, Antoine Sabot-Durand &lt;<a href="mailto:antoine@sabot-durand.net" target="_blank"><a href="mailto:antoine@sabot-durand.net">antoine@sabot-durand.net</a></a>&gt; wrote:<br>


<br></div><div></div><blockquote type="cite"><div>For what I understand, it&#39;s not quite the same. I think it&#39;s more like @Factory, but I agree it&#39;s nearly the same and I could use it was possible to &quot;Named&quot; the &quot;outjected&quot; property in order to use it in EL...<br>


<div>
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">


<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">


<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">


<br>Antoine </div><br><br></span><br></div></span><br></div></span><br></span><br>
</div>
<br><div><div>Le 16 mars 2011 à 17:54, Ken Finnigan a écrit :</div><br><blockquote type="cite">Antoine,<br><br>I&#39;m pretty sure the equivalent for CDI is to use @Produces.<br><br>Ken<br><br><br><div class="gmail_quote">


On Wed, Mar 16, 2011 at 12:47 PM, Antoine Sabot-Durand <span dir="ltr">&lt;<a href="mailto:antoine@sabot-durand.net" target="_blank"></a><a href="mailto:antoine@sabot-durand.net" target="_blank"><a href="mailto:antoine@sabot-durand.net">antoine@sabot-durand.net</a></a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Hi all,<br>
<br>
I try to shorten my Expression language code and don&#39;t want to create delegate methods in my controller to access  propertir of a business component.<br>
<br>
I didn&#39;t found something like @Out. Does it exists ?<br>
<br>
Thanks,<br>
<br>
Antoine<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org" target="_blank"></a><a href="mailto:seam-dev@lists.jboss.org" target="_blank"><a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank"></a><a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/seam-dev">https://lists.jboss.org/mailman/listinfo/seam-dev</a></a><br>

</blockquote></div><br>
</blockquote></div><br></div></blockquote></div></div></div><br>_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org"><a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/seam-dev">https://lists.jboss.org/mailman/listinfo/seam-dev</a></a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><div><a href="http://www.google.com/profiles/dan.j.allen#about" target="_blank"><a href="http://www.google.com/profiles/dan.j.allen#about">http://www.google.com/profiles/dan.j.allen#about</a></a><br>


<a href="http://mojavelinux.com" target="_blank"><a href="http://mojavelinux.com">http://mojavelinux.com</a></a><br><a href="http://mojavelinux.com/seaminaction" target="_blank"><a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a></a><br>
</div><br>
</div>
</div></blockquote></body></html>