Re: [2/2] git commit: WICKET-5350 adjust components' wildcards
On Mon, 28 Jul 2014 12:12:21 +0300 Martin Grigorov wrote: > > - protected void onSelectionChanged(final Collection > extends T> newSelection) > > + protected void onSelectionChanged(final Collection > > newSelection) > > > > Should the application be allowed to add new items to "newSelestion" ? > Is there a use case for this ? > Or the idea is to make the API as open as possible and leave the > application decide what to do ? There is a use case: Upon the user selecting something, the application may want to add something to the selection. Maybe one of the selected values is dependent on another, and the second one can thus be automatically selected. Carl-Eric
Re: [2/2] git commit: WICKET-5350 adjust components' wildcards
On Sun, Jul 27, 2014 at 12:45 AM, wrote: > WICKET-5350 adjust components' wildcards > > Project: http://git-wip-us.apache.org/repos/asf/wicket/repo > Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a04fc96a > Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a04fc96a > Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a04fc96a > > Branch: refs/heads/WICKET-5350-wildcards > Commit: a04fc96a7289c5c0f46511a6e70f3cee542d0c9a > Parents: 0623140 > Author: svenmeier > Authored: Sat Jul 26 23:44:00 2014 +0200 > Committer: svenmeier > Committed: Sat Jul 26 23:44:00 2014 +0200 > > -- > .../wicket/markup/html/form/AbstractChoice.java | 16 > .../apache/wicket/markup/html/form/CheckGroup.java | 2 +- > .../markup/html/form/upload/FileUploadField.java| 5 +++-- > .../apache/wicket/markup/html/list/ListView.java| 10 +- > .../wicket/markup/html/list/PageableListView.java | 4 ++-- > .../wicket/markup/html/list/PropertyListView.java | 4 ++-- > .../markup/repeater/AbstractPageableView.java | 2 +- > .../wicket/markup/repeater/RefreshingView.java | 3 ++- > .../markup/repeater/data/ListDataProvider.java | 2 +- > .../markup/html/form/ListMultipleChoiceTest.java| 4 ++-- > .../wicket/extensions/yui/calendar/DatesPage1.java | 2 +- > .../wicket/examples/ajax/builtin/ChoicePage.java| 4 ++-- > .../examples/compref/CheckBoxSelectorPage.java | 2 +- > .../apache/wicket/examples/compref/SelectPage.java | 8 > .../org/apache/wicket/examples/dates/DatesPage.java | 2 +- > .../ajax/markup/html/AjaxEditableChoiceLabel.java | 6 +++--- > .../markup/html/form/palette/Palette.java | 11 +-- > .../form/palette/component/AbstractOptions.java | 2 +- > .../html/form/palette/component/Recorder.java | 6 +++--- > .../markup/html/form/select/SelectOption.java | 2 +- > .../markup/html/form/select/SelectOptions.java | 14 +++--- > .../repeater/data/table/filter/ChoiceFilter.java| 10 ++ > .../table/filter/ChoiceFilteredPropertyColumn.java | 8 > .../html/repeater/data/table/DataTableTest.java | 5 +++-- > 24 files changed, 69 insertions(+), 65 deletions(-) > -- > > > > http://git-wip-us.apache.org/repos/asf/wicket/blob/a04fc96a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java > -- > diff --git > a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java > b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java > index e29c7fb..ee566db 100644 > --- > a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java > +++ > b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java > @@ -22,7 +22,7 @@ import java.util.List; > import org.apache.wicket.markup.ComponentTag; > import org.apache.wicket.markup.MarkupStream; > import org.apache.wicket.model.IModel; > -import org.apache.wicket.model.util.WildcardListModel; > +import org.apache.wicket.model.util.ListModel; > import org.apache.wicket.util.convert.IConverter; > import org.apache.wicket.util.string.AppendingStringBuffer; > import org.apache.wicket.util.string.Strings; > @@ -90,7 +90,7 @@ public abstract class AbstractChoice extends > FormComponent > */ > public AbstractChoice(final String id) > { > - this(id, new WildcardListModel<>(new ArrayList()), new > ChoiceRenderer()); > + this(id, new ListModel<>(new ArrayList()), new > ChoiceRenderer()); > } > > /** > @@ -103,7 +103,7 @@ public abstract class AbstractChoice extends > FormComponent > */ > public AbstractChoice(final String id, final List > choices) > { > - this(id, new WildcardListModel<>(choices), new > ChoiceRenderer()); > + this(id, new ListModel<>(choices), new > ChoiceRenderer()); > } > > /** > @@ -119,7 +119,7 @@ public abstract class AbstractChoice extends > FormComponent > public AbstractChoice(final String id, final List > choices, > final IChoiceRenderer renderer) > { > - this(id, new WildcardListModel<>(choices), renderer); > + this(id, new ListModel<>(choices), renderer); > } > > /** > @@ -134,7 +134,7 @@ public abstract class AbstractChoice extends > FormComponent > */ > public AbstractChoice(final String id, IModel model, final > List choices) > { > - this(id, model, new WildcardListModel<>(choices), new > ChoiceRenderer()); > + this(id, model, new ListModel<>(choices), new > ChoiceRenderer()); > } > > /** >
Re: [1/2] git commit: WICKET-5350 remove wildcards from #ofList() and others
I think it would be better to mark the Wildcard*** classes as deprecated for Wicket 7.x and remove them in 8.x Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Sun, Jul 27, 2014 at 12:45 AM, wrote: > Repository: wicket > Updated Branches: > refs/heads/WICKET-5350-wildcards [created] a04fc96a7 > > > WICKET-5350 remove wildcards from #ofList() and others > > Project: http://git-wip-us.apache.org/repos/asf/wicket/repo > Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/06231408 > Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/06231408 > Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/06231408 > > Branch: refs/heads/WICKET-5350-wildcards > Commit: 06231408eedb028c1887b22e9265cc8591a8d4d0 > Parents: 90b7ca9 > Author: svenmeier > Authored: Sat Jul 26 23:41:37 2014 +0200 > Committer: svenmeier > Committed: Sat Jul 26 23:41:37 2014 +0200 > > -- > .../java/org/apache/wicket/model/Model.java | 18 +++--- > .../model/util/WildcardCollectionModel.java | 57 -- > .../wicket/model/util/WildcardListModel.java| 62 > .../wicket/model/util/WildcardSetModel.java | 57 -- > 4 files changed, 9 insertions(+), 185 deletions(-) > -- > > > > http://git-wip-us.apache.org/repos/asf/wicket/blob/06231408/wicket-core/src/main/java/org/apache/wicket/model/Model.java > -- > diff --git a/wicket-core/src/main/java/org/apache/wicket/model/Model.java > b/wicket-core/src/main/java/org/apache/wicket/model/Model.java > index 8cdadac..4838d4b 100644 > --- a/wicket-core/src/main/java/org/apache/wicket/model/Model.java > +++ b/wicket-core/src/main/java/org/apache/wicket/model/Model.java > @@ -24,10 +24,10 @@ import java.util.Map; > import java.util.Set; > > import org.apache.wicket.WicketRuntimeException; > +import org.apache.wicket.model.util.CollectionModel; > +import org.apache.wicket.model.util.ListModel; > import org.apache.wicket.model.util.MapModel; > -import org.apache.wicket.model.util.WildcardCollectionModel; > -import org.apache.wicket.model.util.WildcardListModel; > -import org.apache.wicket.model.util.WildcardSetModel; > +import org.apache.wicket.model.util.SetModel; > import org.apache.wicket.util.lang.Objects; > > > @@ -78,9 +78,9 @@ public class Model implements > IModel > *The List, which may or may not be Serializable > * @return A Model object wrapping the List > */ > - public static IModel> ofList(final List extends C> list) > + public static IModel> ofList(final List list) > { > - return new WildcardListModel<>(list); > + return new ListModel<>(list); > } > > /** > @@ -110,9 +110,9 @@ public class Model implements > IModel > *The Set, which may or may not be Serializable > * @return A Model object wrapping the Set > */ > - public static IModel> ofSet(final Set extends C> set) > + public static IModel> ofSet(final Set set) > { > - return new WildcardSetModel<>(set); > + return new SetModel<>(set); > } > > /** > @@ -125,9 +125,9 @@ public class Model implements > IModel > *The Collection, which may or may not be Serializable > * @return A Model object wrapping the Set > */ > - public static IModel> of(final > Collection collection) > + public static IModel> ofCollection(final > Collection collection) > { > - return new WildcardCollectionModel<>(collection); > + return new CollectionModel<>(collection); > } > > > > > http://git-wip-us.apache.org/repos/asf/wicket/blob/06231408/wicket-core/src/main/java/org/apache/wicket/model/util/WildcardCollectionModel.java > -- > diff --git > a/wicket-core/src/main/java/org/apache/wicket/model/util/WildcardCollectionModel.java > b/wicket-core/src/main/java/org/apache/wicket/model/util/WildcardCollectionModel.java > deleted file mode 100644 > index 8a8d138..000 > --- > a/wicket-core/src/main/java/org/apache/wicket/model/util/WildcardCollectionModel.java > +++ /dev/null > @@ -1,57 +0,0 @@ > -/* > - * Licensed to the Apache Software Foundation (ASF) under one or more > - * contributor license agreements. See the NOTICE file distributed with > - * this work for additional information regarding copyright ownership. > - * The ASF licenses this file to You under the Apache License, Version 2.0 > - * (the "License"); you may not use this file except in compliance with > - * the License. You may obtain a copy of the License at > - * > - * http://www.apache.org/licenses/LICENSE-2.0