Changed with https://issues.apache.org/jira/browse/WICKET-6293
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Sun, Dec 4, 2016 at 10:17 PM, Sven Meier wrote:
> Hi Martin,
>
> > It is shorter with three chars "c, ".
>
> .. and two /parentheses.
Hi Martin,
> It is shorter with three chars "c, ".
.. and two /parentheses. /I though you knew of a shorter lambda syntax I
wasn't aware of.
I'm fine with a single method, at least it's consistent with
#onComponentTag() this way.
Have fun
Sven
On 04.12.2016 14:26, Martin Grigorov wrote:
Hi Sven
label1.add(Behavior.onTag(t->t.put(key, label1.getId())); // 58
characters
label1.add(Behavior.onTag((c, t)->t.put(key, label1.getId())); // 63
charactes
"I'd like to preserve the first one because it's syntactically shorter."
I thought that you say that the first example is
>It is shorter with three chars "c, "
Can you explain how that works?
Thanks
Sven
On 03.12.2016 12:36, Martin Grigorov wrote:
On Sat, Dec 3, 2016 at 12:20 PM, Sven Meier wrote:
Hi,
I see your point.
We could have both:
label1.add(Behavior.onTag(t->t.put(key,
On Sat, Dec 3, 2016 at 12:20 PM, Sven Meier wrote:
> Hi,
>
> I see your point.
>
> We could have both:
>
> label1.add(Behavior.onTag(t->t.put(key, label1.getId()));
> label1.add(Behavior.onTag((c, t)->t.put(key, c.getId()));
>
> Both the Eclipse and JDK compiler accept
Hi,
I see your point.
We could have both:
label1.add(Behavior.onTag(t->t.put(key, label1.getId()));
label1.add(Behavior.onTag((c, t)->t.put(key, c.getId()));
Both the Eclipse and JDK compiler accept these.
The component should come as first argument as in
But it would add another reference to the component, increasing the
footprint. It also enables you to 'bind' to another (unintended)
component that's available in the scope.
Label label1 = new Label(...);
...
Label label4 = new Label(...);
label1.add(Behavior.onTag(t->t.put(key,
Agreed!
Thanks!
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Fri, Nov 25, 2016 at 9:27 PM, Sven Meier wrote:
> Hi,
>
> the behavior is added to a single component only and readily available
> anyway in scope:
>
> component.add(onTag(tag
Hi,
the behavior is added to a single component only and readily available
anyway in scope:
component.add(onTag(tag -> tag.put(key, component.getId()));
What do we gain when the same component is given as argument?
component.add(onTag(component, tag -> tag.put(key,