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 class="HOEnZb"><div class="h5"><br>
---------- Forwarded message ----------<br>
From: Lincoln Baxter, III &lt;<a href="mailto:lincolnbaxter@gmail.com">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">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">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">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">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></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>