Agreed, +1 for @Bound - and someone needs to fix this list to reply-all by default. I&#39;ll try.<br><br><div class="gmail_quote">On Tue, Aug 14, 2012 at 10:44 AM, Jonathan Fuerth <span dir="ltr">&lt;<a href="mailto:jfuerth@redhat.com" target="_blank">jfuerth@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif">Me too. I understand that @Inject is an imperative verb, but maybe that was a mistake in a spec we don&#39;t control. :)<div>
<br></div><div>The good news is that it reads well whether or not @Inject is also present:</div><div class="im"><div><br></div><div>@Inject @Bound private TextBox input;</div></div><div><div>@Bound private TextBox input = new TextBox(&quot;moo&quot;);</div>
<div><br></div>-Jonathan</div><div><br></div><div>PS: sorry for the earlier reply which didn&#39;t make it to the list.. I had tried to respond to the list from an account that isn&#39;t subscribed to this list.<br><hr><div style="font-size:12pt;font-style:normal;font-family:Helvetica,Arial,sans-serif;text-decoration:none;font-weight:normal">
<div class="im"><b>From: </b>&quot;Lincoln Baxter, III&quot; &lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt;<br></div><b>To: </b>&quot;Christian Sadilek&quot; &lt;<a href="mailto:csadilek@redhat.com" target="_blank">csadilek@redhat.com</a>&gt;<br>
<b>Cc: </b><a href="mailto:errai-dev@lists.jboss.org" target="_blank">errai-dev@lists.jboss.org</a>, &quot;Mike Brock&quot; &lt;<a href="mailto:brockm@gmail.com" target="_blank">brockm@gmail.com</a>&gt;, &quot;Jonathan Fuerth&quot; &lt;<a href="mailto:jfuerth@gmail.com" target="_blank">jfuerth@gmail.com</a>&gt;<br>
<b>Sent: </b>Monday, August 13, 2012 1:37:04 PM<br><b>Subject: </b>Re: [errai-dev] Fwd: Errai UI and DataBinding<div><div class="h5"><br><br>I&#39;m still leaning toward @Bound<br><br><div class="gmail_quote">On Mon, Aug 13, 2012 at 1:12 PM, Christian Sadilek <span dir="ltr">&lt;<a href="mailto:csadilek@redhat.com" target="_blank">csadilek@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I agree that AutoBound is better, so the remaining question is just @Bind vs. @Bound for DataFields?<div>

<br></div><div><blockquote><span style="font-size:large;font-family:&#39;courier new&#39;,monospace">As adjectives:</span></blockquote><blockquote><div><span style="font-family:&#39;courier new&#39;,monospace"><br>
@Templated</span><br style="font-family:&#39;courier new&#39;,monospace"><span style="font-family:&#39;courier new&#39;,monospace">public class Thing extends Composite {</span><br style="font-family:&#39;courier new&#39;,monospace">

<br style="font-family:&#39;courier new&#39;,monospace"><span style="font-family:&#39;courier new&#39;,monospace">  @Inject</span><br style="font-family:&#39;courier new&#39;,monospace"></div><span style="font-family:&#39;courier new&#39;,monospace">  @Bound</span><span style="font-family:&#39;courier new&#39;,monospace">(property=&quot;street&quot;)</span></blockquote>

<blockquote><span style="font-family:&#39;courier new&#39;,monospace">  @DataField</span><br style="font-family:&#39;courier new&#39;,monospace"><span style="font-family:&#39;courier new&#39;,monospace">  private TextBox input;</span><br style="font-family:&#39;courier new&#39;,monospace">

</blockquote><br><blockquote><font face="courier new, monospace">  or</font></blockquote><br><div><blockquote><span style="font-family:&#39;courier new&#39;,monospace">  @Inject</span><br style="font-family:&#39;courier new&#39;,monospace">

<span style="font-family:&#39;courier new&#39;,monospace">  @Bind(property=&quot;street&quot;)</span></blockquote><blockquote><span style="font-family:&#39;courier new&#39;,monospace">  @DataField</span><br style="font-family:&#39;courier new&#39;,monospace">

<span style="font-family:&#39;courier new&#39;,monospace">  private TextBox input;</span></blockquote></div><div><div><blockquote><br style="font-family:&#39;courier new&#39;,monospace"><span style="font-family:&#39;courier new&#39;,monospace">}</span></blockquote>

<div><br></div><div><br><div><div>On 2012-08-13, at 12:54 PM, &quot;Lincoln Baxter, III&quot; &lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt; wrote:</div><br><blockquote>
<span style="font-family:courier new,monospace"><font size="4"><font><span style="font-family:arial,helvetica,sans-serif">I&#39;m
 voting for adjectives I guess. It&#39;s typically the way that CDI 
Qualifiers look when functioning with @Inject. Granted, these aren&#39;t 
qualifiers, but they might as well be by how they behave and actually 
modify the result of the injection.<br>
<br>I&#39;m 100% sure how I feel about @AutoBound - but I&#39;m not 100% sure about @Bound.<br></span><br><br></font>As adjectives:</font><br><br><span style="font-family:courier new,monospace">@Templated</span></span><br style="font-family:courier new,monospace">



<span style="font-family:courier new,monospace">public class Thing extends Composite {</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  @Inject</span><br style="font-family:courier new,monospace">



<span style="font-family:courier new,monospace">  @Bound</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  private TextBox input;</span><br style="font-family:courier new,monospace">



<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  @Inject</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  @AutoBound</span><br style="font-family:courier new,monospace">



<span style="font-family:courier new,monospace">  private DataBinder&lt;Model&gt; binder;</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">}</span><br>



<br><br><span style="font-family:courier new,monospace"><font size="4">As verbs:</font><br><br>
@Templated</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">public class Thing extends Composite {</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
  @Inject</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
  @Bind</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
  private TextBox input;</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
  @Inject</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
  @AutoBind</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
  private DataBinder&lt;Model&gt; binder;</span><div><div><img src="https://mail.google.com/mail/u/0/images/cleardot.gif"></div></div><br style="font-family:courier new,monospace">

<br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">}</span><br><br><div class="gmail_quote">On Mon, Aug 13, 2012 at 11:31 AM, Christian Sadilek <span dir="ltr">&lt;<a href="mailto:csadilek@redhat.com" target="_blank">csadilek@redhat.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Had the same thought. It&#39;s @Inject, so I thought @Bind would be more consistent on the data field….but I am fine either way…let&#39;s vote :)<div>


<div><br><div><div>On 2012-08-13, at 11:26 AM, &quot;Lincoln Baxter, III&quot; &lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt; wrote:</div><br><blockquote>
Should it be @Bind or @Bound?<br><br><div class="gmail_quote">On Mon, Aug 13, 2012 at 10:52 AM, Christian Sadilek <span dir="ltr">&lt;<a href="mailto:christian.sadilek@gmail.com" target="_blank">christian.sadilek@gmail.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">just forwarding Lincoln&#39;s reply. If there are no objections to @Bind<br>
and @AutoBound, I will go ahead and implement this later today or<br>
tomorrow.<br>
<br>
cheers,<br>
christian<br>
<div><br>
---------- Forwarded message ----------<br>
From: Lincoln Baxter, III &lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt;<br>
Date: Mon, Aug 13, 2012 at 12:05 AM<br>
Subject: Re: [errai-dev] Errai UI and DataBinding<br>
To: Christian Sadilek &lt;<a href="mailto:christian.sadilek@gmail.com" target="_blank">christian.sadilek@gmail.com</a>&gt;<br>
<br>
<br>
I do think we need programmatic control over bindings. I think that<br>
was one of my first questions when we implemented the @Injected<br>
databinder. I agree with you that the current state is a bit too<br>
&quot;magical,&quot; and I think that the suggestions you&#39;ve brough up will help<br>
to eliminate that.<br>
<br>
+1 to individual @Bind and also aggregate @Autobind / @Autobound annotation<br>
<br>
~Lincoln<br>
<br>
On Sun, Aug 12, 2012 at 7:53 PM, Christian Sadilek<br>
&lt;<a href="mailto:christian.sadilek@gmail.com" target="_blank">christian.sadilek@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;d like to propose a change to our DataBinding integration in Errai<br>
&gt; UI. Basically, I think we should retire the implicit binding approach<br>
&gt; and introduce a new annotation. So, within a @Templated class that has<br>
&gt; a DataBinder&lt;T&gt; field, we should have the following options:<br>
&gt;<br>
&gt; 1. No binding<br>
&gt; @Inject @DataField<br>
&gt; private TextBox date;<br>
&gt;<br>
&gt; 2. Binding to model property with matching name<br>
&gt; @Inject @Bind @DataField<br>
&gt; private TextBox date;<br>
&gt;<br>
&gt; 3. Binding to model property with matching name using provided converter<br>
&gt; @Inject @Bind(converter=MyDataConverter.class) @DataField<br>
&gt; private TextBox date;<br>
&gt;<br>
&gt; 4. Binding to model property with provided name<br>
&gt; @Inject @Bind(property=&quot;lastUpdated&quot;) @DataField<br>
&gt; private TextBox date;<br>
&gt;<br>
&gt; 5. Binding to model property with provided name using provided converter<br>
&gt; @Inject @Bind(property=&quot;lastUpdated&quot;, converter=MyDataConverter.class)<br>
&gt; @DataField<br>
&gt; private TextBox date;<br>
&gt;<br>
&gt; Additionally, we could add an annotation (e.g. @AutoBind) that when<br>
&gt; present on the @Templated class causes our current behaviour. All<br>
&gt; @DataFields will be bound to model properties with matching names.<br>
&gt;<br>
&gt; I prefer this approach because just by looking at the code I get all<br>
&gt; the information I need to undersand what&#39;s going on. Our current<br>
&gt; approach seems a little too magical :).<br>
&gt;<br>
&gt; WDYT?<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Christian<br>
&gt; _______________________________________________<br>
&gt; errai-dev mailing list<br>
&gt; <a href="mailto:errai-dev@lists.jboss.org" target="_blank">errai-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/errai-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/errai-dev</a><br>
<br>
<br>
<br>
<br>
--<br>
Lincoln Baxter, III<br>
<a href="http://ocpsoft.org/" target="_blank">http://ocpsoft.org</a><br>
&quot;Simpler is better.&quot;<br>
_______________________________________________<br>
errai-dev mailing list<br>
<a href="mailto:errai-dev@lists.jboss.org" target="_blank">errai-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/errai-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/errai-dev</a><br>
</div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org/" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;<br>
_______________________________________________<br>errai-dev mailing list<br><a href="mailto:errai-dev@lists.jboss.org" target="_blank">errai-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/errai-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/errai-dev</a><br>


</blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org/" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;<br>



</blockquote></div><br></div></div></div></div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;<br>


<br>_______________________________________________<br>errai-dev mailing list<br><a href="mailto:errai-dev@lists.jboss.org" target="_blank">errai-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/errai-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/errai-dev</a><br>
</div></div></div><br></div></div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;<br>