Re: One more Apache project uses Wicket - AsterixDb

2016-11-25 Thread Andrea Del Bene

Very good! I will add it to the list this weekend.

Andrea.


On 24/11/2016 21:51, Martin Grigorov wrote:

https://github.com/apache/asterixdb/search?l=Maven+POM&q=wicket&utf8=%E2%9C%93

we should add it to http://wicket.apache.org/apache/!


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov





using lambdas fro Args?

2016-11-25 Thread Ernesto Reinaldo Barreiro
Hi,

Does it make sense to use lambdas for things like

https://github.com/apache/wicket/blob/master/wicket-util/src/main/java/org/apache/wicket/util/lang/Args.java#L37

?

-- 
Regards - Ernesto Reinaldo Barreiro


Re: using lambdas fro Args?

2016-11-25 Thread Martin Grigorov
How the new usage would look like ?

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Nov 25, 2016 at 12:08 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
>
> Does it make sense to use lambdas for things like
>
> https://github.com/apache/wicket/blob/master/wicket-
> util/src/main/java/org/apache/wicket/util/lang/Args.java#L37
>
> ?
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: using lambdas fro Args?

2016-11-25 Thread Ernesto Reinaldo Barreiro
*public class *Args
{
*public static * T notNull(T argument, Supplier name) {
*if*(argument == *null*) {
*throw new *IllegalArgumentException(name.get() + *" may not be
null"*);
} *else *{
*return *argument;
}
}

*public void *test() {
Args.*notNull*(*this*, ()-> *"this"*);
}
}

On Fri, Nov 25, 2016 at 12:25 PM, Martin Grigorov 
wrote:

> How the new usage would look like ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Nov 25, 2016 at 12:08 PM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
> > Hi,
> >
> > Does it make sense to use lambdas for things like
> >
> > https://github.com/apache/wicket/blob/master/wicket-
> > util/src/main/java/org/apache/wicket/util/lang/Args.java#L37
> >
> > ?
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: using lambdas fro Args?

2016-11-25 Thread Martin Grigorov
What would be the benefit ?

The logging libraries provide such API but there one want to avoid
calculating the log message unless really needed.
In our case the "name" is not something expensive to calculate. It is a
static string (always?!).

What would bring value is using the Java 8 goodies to read the parameter
name via reflection, but for this the application should use '-parameters'
compile argument. See https://github.com/isisaddons/isis-metamodel-paraname8

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Nov 25, 2016 at 12:48 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> *public class *Args
> {
> *public static * T notNull(T argument, Supplier name) {
> *if*(argument == *null*) {
> *throw new *IllegalArgumentException(name.get() + *" may not
> be
> null"*);
> } *else *{
> *return *argument;
> }
> }
>
> *public void *test() {
> Args.*notNull*(*this*, ()-> *"this"*);
> }
> }
>
> On Fri, Nov 25, 2016 at 12:25 PM, Martin Grigorov 
> wrote:
>
> > How the new usage would look like ?
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Fri, Nov 25, 2016 at 12:08 PM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Does it make sense to use lambdas for things like
> > >
> > > https://github.com/apache/wicket/blob/master/wicket-
> > > util/src/main/java/org/apache/wicket/util/lang/Args.java#L37
> > >
> > > ?
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > >
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: using lambdas fro Args?

2016-11-25 Thread Ernesto Reinaldo Barreiro
ok.

On Fri, Nov 25, 2016 at 1:16 PM, Martin Grigorov 
wrote:

> What would be the benefit ?
>
> The logging libraries provide such API but there one want to avoid
> calculating the log message unless really needed.
> In our case the "name" is not something expensive to calculate. It is a
> static string (always?!).
>
> What would bring value is using the Java 8 goodies to read the parameter
> name via reflection, but for this the application should use '-parameters'
> compile argument. See https://github.com/isisaddons/
> isis-metamodel-paraname8
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Nov 25, 2016 at 12:48 PM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
> > *public class *Args
> > {
> > *public static * T notNull(T argument, Supplier name) {
> > *if*(argument == *null*) {
> > *throw new *IllegalArgumentException(name.get() + *" may not
> > be
> > null"*);
> > } *else *{
> > *return *argument;
> > }
> > }
> >
> > *public void *test() {
> > Args.*notNull*(*this*, ()-> *"this"*);
> > }
> > }
> >
> > On Fri, Nov 25, 2016 at 12:25 PM, Martin Grigorov 
> > wrote:
> >
> > > How the new usage would look like ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Fri, Nov 25, 2016 at 12:08 PM, Ernesto Reinaldo Barreiro <
> > > reier...@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > Does it make sense to use lambdas for things like
> > > >
> > > > https://github.com/apache/wicket/blob/master/wicket-
> > > > util/src/main/java/org/apache/wicket/util/lang/Args.java#L37
> > > >
> > > > ?
> > > >
> > > > --
> > > > Regards - Ernesto Reinaldo Barreiro
> > > >
> > >
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro


[GitHub] wicket pull request #194: WICKET-6287 Switch from json.org to open-json - 6....

2016-11-25 Thread klopfdreh
GitHub user klopfdreh opened a pull request:

https://github.com/apache/wicket/pull/194

WICKET-6287 Switch from json.org to open-json - 6.x

There are clirr errors, because of some classes missing in open-json

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/klopfdreh/wicket WICKET-6287_6.x

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/194.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #194


commit 9be0c0faaa9e6f4343378254ce94755510b688f9
Author: Tobias Soloschenko 
Date:   2016-11-25T08:18:27Z

WICKET-6287 Switch from json.org to open-json - 6.x




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #195: WICKET-6287 Switch from json.org to open-json - 7....

2016-11-25 Thread klopfdreh
GitHub user klopfdreh opened a pull request:

https://github.com/apache/wicket/pull/195

WICKET-6287 Switch from json.org to open-json - 7.x

There are clirr errors, because of some classes missing in open-json

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/klopfdreh/wicket WICKET-6287_7.x

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/195.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #195


commit cc057d0cca748c537762b3ed354dc795c455a424
Author: Tobias Soloschenko 
Date:   2016-11-25T07:29:40Z

WICKET-6287 Switch from json.org to open-json - 7.x




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2016-11-25 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
fyi @martin-g 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #194: WICKET-6287 Switch from json.org to open-json - 6.x

2016-11-25 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/194
  
fyi @martin-g 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #196: WICKET-6289 fix autolinker so it does not generate...

2016-11-25 Thread duesenklipper
GitHub user duesenklipper opened a pull request:

https://github.com/apache/wicket/pull/196

WICKET-6289 fix autolinker so it does not generate an onclick attribu…

…te for img tags

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/duesenklipper/wicket 
wicket-8.x/WICKET-6289-autolinker-onclick-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/196.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #196


commit ba0f578f53b158ff375e7de6dd7097c7ff93ac79
Author: Carl-Eric Menzel 
Date:   2016-11-25T14:16:31Z

WICKET-6289 fix autolinker so it does not generate an onclick attribute for 
img tags




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #197: WICKET-6289 fix autolinker so it does not generate...

2016-11-25 Thread duesenklipper
GitHub user duesenklipper opened a pull request:

https://github.com/apache/wicket/pull/197

WICKET-6289 fix autolinker so it does not generate an onclick attribu…

…te for img tags

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/duesenklipper/wicket 
wicket-7/WICKET-6289-autolinker-onclick-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/197.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #197


commit 522a1b5a87f1d89fad961c0561391d2b4bb59ac8
Author: Carl-Eric Menzel 
Date:   2016-11-25T14:16:31Z

WICKET-6289 fix autolinker so it does not generate an onclick attribute for 
img tags




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #199: WICKET-6289 fix autolinker so it does not generate...

2016-11-25 Thread duesenklipper
GitHub user duesenklipper opened a pull request:

https://github.com/apache/wicket/pull/199

WICKET-6289 fix autolinker so it does not generate an onclick attribu…

…te for img tags

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/duesenklipper/wicket 
wicket-1.5/WICKET-6289-autolinker-onclick-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/199.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #199


commit 88a8092cb324df29cdc639029c31f851ed7291b3
Author: Carl-Eric Menzel 
Date:   2016-11-25T14:16:31Z

WICKET-6289 fix autolinker so it does not generate an onclick attribute for 
img tags




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #198: WICKET-6289 fix autolinker so it does not generate...

2016-11-25 Thread duesenklipper
GitHub user duesenklipper opened a pull request:

https://github.com/apache/wicket/pull/198

WICKET-6289 fix autolinker so it does not generate an onclick attribu…

…te for img tags

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/duesenklipper/wicket 
wicket-6/WICKET-6289-autolinker-onclick-fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/198.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #198


commit c22e46c8fd6caa9e7697320700062c4f52663551
Author: Carl-Eric Menzel 
Date:   2016-11-25T14:16:31Z

WICKET-6289 fix autolinker so it does not generate an onclick attribute for 
img tags




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #199: WICKET-6289 fix autolinker so it does not generate an onc...

2016-11-25 Thread martin-g
Github user martin-g commented on the issue:

https://github.com/apache/wicket/pull/199
  
Is it really needed for 1.5.x ?
This branch is for security fixes only.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Behavior#onTag() doesn't have the Component

2016-11-25 Thread Martin Grigorov
Hi,

At Martijn's slides from ApacheCon [1] I've noticed that critiques he
mention is that org.apache.wicket.behavior.Behavior#onTag() uses
SerializableConsumer and ignores the Component parameter.
I agree that having the component would be handy!

Any good reasons why it should be like this ?

1.
http://events.linuxfoundation.org/sites/events/files/slides/Whats%20up%20with%20Wicket%208%20and%20Java%208.pdf


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


[GitHub] wicket issue #196: WICKET-6289 fix autolinker so it does not generate an onc...

2016-11-25 Thread martin-g
Github user martin-g commented on the issue:

https://github.com/apache/wicket/pull/196
  
Looks good!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Behavior#onTag() doesn't have the Component

2016-11-25 Thread Sven Meier

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, 
component.getId(;


Note that the first component has a better type, the argument would just 
be a Component:


foo.add(onTag(tag -> tag.put(key, foo.getBar(;

Regards
Sven


On 25.11.2016 20:51, Martin Grigorov wrote:

Hi,

At Martijn's slides from ApacheCon [1] I've noticed that critiques he
mention is that org.apache.wicket.behavior.Behavior#onTag() uses
SerializableConsumer and ignores the Component parameter.
I agree that having the component would be handy!

Any good reasons why it should be like this ?

1.
http://events.linuxfoundation.org/sites/events/files/slides/Whats%20up%20with%20Wicket%208%20and%20Java%208.pdf


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov