Author: ivaynberg
Date: Fri Apr 24 08:53:10 2009
New Revision: 768227

URL: http://svn.apache.org/viewvc?rev=768227&view=rev
Log:
Applied generics changes from WICKET-2165 to make list models betters
Issue: WICKET-2165

Added:
    wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/markup/
    wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/markup/html/
    
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/markup/html/form/
    
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/markup/html/list/
    
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/markup/repeater/
    wicket/trunk/wicket/src/main/java/org/apache/wicket/extensions/
    wicket/trunk/wicket/src/main/java/org/apache/wicket/extensions/markup/
    wicket/trunk/wicket/src/main/java/org/apache/wicket/extensions/markup/html/
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/extensions/markup/html/form/
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/
Modified:
    
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java
    
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBoxMultipleChoice.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListChoice.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListMultipleChoice.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PageableListView.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PropertyListView.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java

Modified: 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java
 (original)
+++ 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java
 Fri Apr 24 08:53:10 2009
@@ -82,7 +82,7 @@
        private static final long serialVersionUID = 1L;
 
        /** collection containing all available choices */
-       private final IModel<Collection<T>> choicesModel;
+       private final IModel<? extends Collection<? extends T>> choicesModel;
 
        /**
         * choice render used to render the choices in both available and 
selected collections
@@ -148,7 +148,7 @@
         * @param allowOrder
         *            Allow user to move selections up and down
         */
-       public Palette(String id, IModel<Collection<T>> choicesModel,
+       public Palette(String id, IModel<? extends Collection<? extends T>> 
choicesModel,
                IChoiceRenderer<T> choiceRenderer, int rows, boolean allowOrder)
        {
                this(id, null, choicesModel, choiceRenderer, rows, allowOrder);
@@ -169,7 +169,7 @@
         * @param allowOrder
         *            Allow user to move selections up and down
         */
-       public Palette(String id, IModel<List<T>> model, IModel<Collection<T>> 
choicesModel,
+       public Palette(String id, IModel<List<T>> model, IModel<? extends 
Collection<? extends T>> choicesModel,
                IChoiceRenderer<T> choiceRenderer, int rows, boolean allowOrder)
        {
                super(id, model);
@@ -472,7 +472,7 @@
        /**
         * @return collection representing all available items
         */
-       public Collection<T> getChoices()
+       public Collection<? extends T> getChoices()
        {
                return choicesModel.getObject();
        }

Modified: 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java
 (original)
+++ 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/Recorder.java
 Fri Apr 24 08:53:10 2009
@@ -158,7 +158,7 @@
        public Iterator<T> getUnselectedChoices()
        {
                IChoiceRenderer<T> renderer = getPalette().getChoiceRenderer();
-               Collection<T> choices = getPalette().getChoices();
+               Collection<? extends T> choices = getPalette().getChoices();
 
                if (choices.size() - ids.length == 0)
                {
@@ -166,7 +166,7 @@
                }
 
                List<T> unselected = new ArrayList<T>(Math.max(1, 
choices.size() - ids.length));
-               Iterator<T> it = choices.iterator();
+               Iterator<? extends T> it = choices.iterator();
                while (it.hasNext())
                {
                        final T choice = it.next();

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
 Fri Apr 24 08:53:10 2009
@@ -48,7 +48,7 @@
        private static final long serialVersionUID = 1L;
 
        /** The list of objects. */
-       private IModel<List<? extends E>> choices;
+       private IModel<? extends List<? extends E>> choices;
 
        /** The renderer used to generate display/id values for the objects. */
        private IChoiceRenderer<E> renderer;
@@ -140,7 +140,7 @@
         *            The collection of choices in the dropdown
         * @see org.apache.wicket.Component#Component(String)
         */
-       public AbstractChoice(final String id, final IModel<List<? extends E>> 
choices)
+       public AbstractChoice(final String id, final IModel<? extends List<? 
extends E>> choices)
        {
                this(id, choices, new ChoiceRenderer<E>());
        }
@@ -156,7 +156,7 @@
         *            The collection of choices in the dropdown
         * @see org.apache.wicket.Component#Component(String)
         */
-       public AbstractChoice(final String id, final IModel<List<? extends E>> 
choices,
+       public AbstractChoice(final String id, final IModel<? extends List<? 
extends E>> choices,
                final IChoiceRenderer<E> renderer)
        {
                super(id);
@@ -175,7 +175,7 @@
         *            The collection of choices in the dropdown
         * @see org.apache.wicket.Component#Component(String, IModel)
         */
-       public AbstractChoice(final String id, IModel<T> model, final 
IModel<List<? extends E>> choices)
+       public AbstractChoice(final String id, IModel<T> model, final IModel<? 
extends List<? extends E>> choices)
        {
                this(id, model, choices, new ChoiceRenderer<E>());
        }
@@ -194,7 +194,7 @@
         * @see org.apache.wicket.Component#Component(String, IModel)
         */
        public AbstractChoice(final String id, IModel<T> model,
-               final IModel<List<? extends E>> choices, final 
IChoiceRenderer<E> renderer)
+               final IModel<? extends List<? extends E>> choices, final 
IChoiceRenderer<E> renderer)
        {
                super(id, model);
                this.choices = wrap(choices);
@@ -224,7 +224,7 @@
         *            model representing the list of choices
         * @return this for chaining
         */
-       public final AbstractChoice<T, E> setChoices(IModel<List<? extends E>> 
choices)
+       public final AbstractChoice<T, E> setChoices(IModel<? extends List<? 
extends E>> choices)
        {
                if (this.choices != null && this.choices != choices)
                {
@@ -462,7 +462,7 @@
        {
                private static final long serialVersionUID = 1L;
 
-               private final IModel<List<? extends E>> oldChoices;
+               private final IModel<? extends List<? extends E>> oldChoices;
 
                /**
                 * Construct.

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
 Fri Apr 24 08:53:10 2009
@@ -99,7 +99,7 @@
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel)
         */
-       public AbstractSingleSelectChoice(String id, IModel<List<? extends T>> 
choices)
+       public AbstractSingleSelectChoice(String id, IModel<? extends List<? 
extends T>> choices)
        {
                super(id, choices);
        }
@@ -107,7 +107,7 @@
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, 
IModel,IModel)
         */
-       public AbstractSingleSelectChoice(String id, IModel<T> model, 
IModel<List<? extends T>> choices)
+       public AbstractSingleSelectChoice(String id, IModel<T> model, IModel<? 
extends List<? extends T>> choices)
        {
                super(id, model, choices);
        }
@@ -116,7 +116,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
         *      IModel,IChoiceRenderer)
         */
-       public AbstractSingleSelectChoice(String id, IModel<List<? extends T>> 
choices,
+       public AbstractSingleSelectChoice(String id, IModel<? extends List<? 
extends T>> choices,
                IChoiceRenderer<T> renderer)
        {
                super(id, choices, renderer);
@@ -128,7 +128,7 @@
         *      IModel,IChoiceRenderer)
         */
        public AbstractSingleSelectChoice(String id, IModel<T> model,
-               IModel<List<? extends T>> choices, IChoiceRenderer<T> renderer)
+               IModel<? extends List<? extends T>> choices, IChoiceRenderer<T> 
renderer)
        {
                super(id, model, choices, renderer);
        }

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBoxMultipleChoice.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBoxMultipleChoice.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBoxMultipleChoice.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBoxMultipleChoice.java
 Fri Apr 24 08:53:10 2009
@@ -160,7 +160,7 @@
         * @see org.apache.wicket.Component#Component(String)
         * @see AbstractChoice#AbstractChoice(String, java.util.List)
         */
-       public CheckBoxMultipleChoice(final String id, final List<T> choices)
+       public CheckBoxMultipleChoice(final String id, final List<? extends T> 
choices)
        {
                super(id, choices);
        }
@@ -178,7 +178,7 @@
         * @see AbstractChoice#AbstractChoice(String,
         *      
java.util.List,org.apache.wicket.markup.html.form.IChoiceRenderer)
         */
-       public CheckBoxMultipleChoice(final String id, final List<T> choices,
+       public CheckBoxMultipleChoice(final String id, final List<? extends T> 
choices,
                final IChoiceRenderer<T> renderer)
        {
                super(id, choices, renderer);
@@ -197,7 +197,7 @@
         * @see AbstractChoice#AbstractChoice(String, 
org.apache.wicket.model.IModel, java.util.List)
         */
        public CheckBoxMultipleChoice(final String id, IModel<Collection<T>> 
model,
-               final List<T> choices)
+               final List<? extends T> choices)
        {
                super(id, model, choices);
        }
@@ -218,7 +218,7 @@
         *      
java.util.List,org.apache.wicket.markup.html.form.IChoiceRenderer)
         */
        public CheckBoxMultipleChoice(final String id, IModel<Collection<T>> 
model,
-               final List<T> choices, final IChoiceRenderer<T> renderer)
+               final List<? extends T> choices, final IChoiceRenderer<T> 
renderer)
        {
                super(id, model, choices, renderer);
        }
@@ -233,7 +233,7 @@
         * @see org.apache.wicket.Component#Component(String)
         * @see AbstractChoice#AbstractChoice(String, 
org.apache.wicket.model.IModel)
         */
-       public CheckBoxMultipleChoice(String id, IModel<List<? extends T>> 
choices)
+       public CheckBoxMultipleChoice(String id, IModel<? extends List<? 
extends T>> choices)
        {
                super(id, choices);
        }
@@ -252,7 +252,7 @@
         * @see org.apache.wicket.Component#Component(String, 
org.apache.wicket.model.IModel)
         */
        public CheckBoxMultipleChoice(String id, IModel<Collection<T>> model,
-               IModel<List<? extends T>> choices)
+               IModel<? extends List<? extends T>> choices)
        {
                super(id, model, choices);
        }
@@ -270,7 +270,7 @@
         *      
org.apache.wicket.model.IModel,org.apache.wicket.markup.html.form.IChoiceRenderer)
         * @see org.apache.wicket.Component#Component(String)
         */
-       public CheckBoxMultipleChoice(String id, IModel<List<? extends T>> 
choices,
+       public CheckBoxMultipleChoice(String id, IModel<? extends List<? 
extends T>> choices,
                IChoiceRenderer<T> renderer)
        {
                super(id, choices, renderer);
@@ -293,7 +293,7 @@
         *      
org.apache.wicket.model.IModel,org.apache.wicket.markup.html.form.IChoiceRenderer)
         */
        public CheckBoxMultipleChoice(String id, IModel<Collection<T>> model,
-               IModel<List<? extends T>> choices, IChoiceRenderer<T> renderer)
+               IModel<? extends List<? extends T>> choices, IChoiceRenderer<T> 
renderer)
        {
                super(id, model, choices, renderer);
        }

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java
 Fri Apr 24 08:53:10 2009
@@ -115,7 +115,7 @@
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel)
         */
-       public DropDownChoice(String id, IModel<List<? extends T>> choices)
+       public DropDownChoice(String id, IModel<? extends List<? extends T>> 
choices)
        {
                super(id, choices);
        }
@@ -123,7 +123,7 @@
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, 
IModel,IModel)
         */
-       public DropDownChoice(String id, IModel<T> model, IModel<List<? extends 
T>> choices)
+       public DropDownChoice(String id, IModel<T> model, IModel<? extends 
List<? extends T>> choices)
        {
                super(id, model, choices);
        }
@@ -132,7 +132,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
         *      IModel,IChoiceRenderer)
         */
-       public DropDownChoice(String id, IModel<List<? extends T>> choices, 
IChoiceRenderer<T> renderer)
+       public DropDownChoice(String id, IModel<? extends List<? extends T>> 
choices, IChoiceRenderer<T> renderer)
        {
                super(id, choices, renderer);
        }
@@ -142,7 +142,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel,
         *      IModel,IChoiceRenderer)
         */
-       public DropDownChoice(String id, IModel<T> model, IModel<List<? extends 
T>> choices,
+       public DropDownChoice(String id, IModel<T> model, IModel<? extends 
List<? extends T>> choices,
                IChoiceRenderer<T> renderer)
        {
                super(id, model, choices, renderer);

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListChoice.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListChoice.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListChoice.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListChoice.java
 Fri Apr 24 08:53:10 2009
@@ -69,13 +69,13 @@
         */
        public ListChoice(final String id)
        {
-               this(id, null, (List<T>)null, null, defaultMaxRows);
+               this(id, null, (List<? extends T>)null, null, defaultMaxRows);
        }
 
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, List)
         */
-       public ListChoice(final String id, final List<T> choices)
+       public ListChoice(final String id, final List<? extends T> choices)
        {
                this(id, null, choices, null, defaultMaxRows);
        }
@@ -90,7 +90,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
         *      List,IChoiceRenderer)
         */
-       public ListChoice(final String id, final List<T> choices, final 
IChoiceRenderer<T> renderer)
+       public ListChoice(final String id, final List<? extends T> choices, 
final IChoiceRenderer<T> renderer)
        {
                this(id, null, choices, renderer, defaultMaxRows);
        }
@@ -105,7 +105,7 @@
         *            The list of values in the list
         * @see DropDownChoice#DropDownChoice(String, IModel, List)
         */
-       public ListChoice(final String id, final IModel<T> model, final List<T> 
choices)
+       public ListChoice(final String id, final IModel<T> model, final List<? 
extends T> choices)
        {
                this(id, model, choices, null, defaultMaxRows);
        }
@@ -121,7 +121,7 @@
         *            Maximum number of rows to show
         * @see DropDownChoice#DropDownChoice(String, IModel, List)
         */
-       public ListChoice(final String id, final IModel<T> model, final List<T> 
choices,
+       public ListChoice(final String id, final IModel<T> model, final List<? 
extends T> choices,
                final int maxRows)
        {
                this(id, model, choices, null, maxRows);
@@ -138,7 +138,7 @@
         *            See AbstractChoice
         * @see DropDownChoice#DropDownChoice(String, IModel, List)
         */
-       public ListChoice(final String id, final IModel<T> model, final List<T> 
choices,
+       public ListChoice(final String id, final IModel<T> model, final List<? 
extends T> choices,
                final IChoiceRenderer<T> renderer)
        {
                this(id, model, choices, renderer, defaultMaxRows);
@@ -157,7 +157,7 @@
         *            Maximum number of rows to show
         * @see DropDownChoice#DropDownChoice(String, IModel, List)
         */
-       public ListChoice(final String id, final IModel<T> model, final List<T> 
choices,
+       public ListChoice(final String id, final IModel<T> model, final List<? 
extends T> choices,
                final IChoiceRenderer<T> renderer, final int maxRows)
        {
                super(id, model, choices, renderer);
@@ -167,7 +167,7 @@
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel)
         */
-       public ListChoice(String id, IModel<List<? extends T>> choices)
+       public ListChoice(String id, IModel<? extends List<? extends T>> 
choices)
        {
                this(id, null, choices, null, defaultMaxRows);
        }
@@ -175,7 +175,7 @@
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, 
IModel,IModel)
         */
-       public ListChoice(String id, IModel<T> model, IModel<List<? extends T>> 
choices)
+       public ListChoice(String id, IModel<T> model, IModel<? extends List<? 
extends T>> choices)
        {
                this(id, model, choices, null, defaultMaxRows);
        }
@@ -184,7 +184,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
         *      IModel,IChoiceRenderer)
         */
-       public ListChoice(String id, IModel<List<? extends T>> choices, 
IChoiceRenderer<T> renderer)
+       public ListChoice(String id, IModel<? extends List<? extends T>> 
choices, IChoiceRenderer<T> renderer)
        {
                this(id, null, choices, renderer, defaultMaxRows);
        }
@@ -194,7 +194,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel,
         *      IModel,IChoiceRenderer)
         */
-       public ListChoice(String id, IModel<T> model, IModel<List<? extends T>> 
choices,
+       public ListChoice(String id, IModel<T> model, IModel<? extends List<? 
extends T>> choices,
                IChoiceRenderer<T> renderer)
        {
                this(id, model, choices, renderer, defaultMaxRows);
@@ -209,7 +209,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel,
         *      IModel,IChoiceRenderer)
         */
-       public ListChoice(String id, IModel<T> model, IModel<List<? extends T>> 
choices,
+       public ListChoice(String id, IModel<T> model, IModel<? extends List<? 
extends T>> choices,
                IChoiceRenderer<T> renderer, int maxRows)
        {
                super(id, model, choices, renderer);

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListMultipleChoice.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListMultipleChoice.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListMultipleChoice.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ListMultipleChoice.java
 Fri Apr 24 08:53:10 2009
@@ -87,7 +87,7 @@
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, List)
         */
-       public ListMultipleChoice(final String id, final List<T> choices)
+       public ListMultipleChoice(final String id, final List<? extends T> 
choices)
        {
                super(id, choices);
        }
@@ -103,7 +103,7 @@
         *            the maximum number of visible rows.
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, List)
         */
-       public ListMultipleChoice(final String id, final List<T> choices, final 
int maxRows)
+       public ListMultipleChoice(final String id, final List<? extends T> 
choices, final int maxRows)
        {
                super(id, choices);
                this.maxRows = maxRows;
@@ -113,7 +113,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
         *      List,IChoiceRenderer)
         */
-       public ListMultipleChoice(final String id, final List<T> choices,
+       public ListMultipleChoice(final String id, final List<? extends T> 
choices,
                final IChoiceRenderer<T> renderer)
        {
                super(id, choices, renderer);
@@ -122,7 +122,7 @@
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, 
IModel, List)
         */
-       public ListMultipleChoice(final String id, IModel<Collection<T>> 
object, final List<T> choices)
+       public ListMultipleChoice(final String id, IModel<Collection<T>> 
object, final List<? extends T> choices)
        {
                super(id, object, choices);
        }
@@ -131,7 +131,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel,
         *      List,IChoiceRenderer)
         */
-       public ListMultipleChoice(final String id, IModel<Collection<T>> 
object, final List<T> choices,
+       public ListMultipleChoice(final String id, IModel<Collection<T>> 
object, final List<? extends T> choices,
                final IChoiceRenderer<T> renderer)
        {
                super(id, object, choices, renderer);
@@ -140,7 +140,7 @@
        /**
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel)
         */
-       public ListMultipleChoice(String id, IModel<List<? extends T>> choices)
+       public ListMultipleChoice(String id, IModel<? extends List<? extends 
T>> choices)
        {
                super(id, choices);
        }
@@ -149,7 +149,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, 
IModel,IModel)
         */
        public ListMultipleChoice(String id, IModel<Collection<T>> model,
-               IModel<List<? extends T>> choices)
+               IModel<? extends List<? extends T>> choices)
        {
                super(id, model, choices);
        }
@@ -158,7 +158,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
         *      IModel,IChoiceRenderer)
         */
-       public ListMultipleChoice(String id, IModel<List<? extends T>> choices,
+       public ListMultipleChoice(String id, IModel<? extends List<? extends 
T>> choices,
                IChoiceRenderer<T> renderer)
        {
                super(id, choices, renderer);
@@ -170,7 +170,7 @@
         *      IModel,IChoiceRenderer)
         */
        public ListMultipleChoice(String id, IModel<Collection<T>> model,
-               IModel<List<? extends T>> choices, IChoiceRenderer<T> renderer)
+               IModel<? extends List<? extends T>> choices, IChoiceRenderer<T> 
renderer)
        {
                super(id, model, choices, renderer);
        }

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java
 Fri Apr 24 08:53:10 2009
@@ -163,7 +163,7 @@
         * @see org.apache.wicket.Component#Component(String)
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, List)
         */
-       public RadioChoice(final String id, final List<T> choices)
+       public RadioChoice(final String id, final List<? extends T> choices)
        {
                super(id, choices);
        }
@@ -181,7 +181,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
         *      List,IChoiceRenderer)
         */
-       public RadioChoice(final String id, final List<T> choices, final 
IChoiceRenderer<T> renderer)
+       public RadioChoice(final String id, final List<? extends T> choices, 
final IChoiceRenderer<T> renderer)
        {
                super(id, choices, renderer);
        }
@@ -198,7 +198,7 @@
         * @see org.apache.wicket.Component#Component(String, IModel)
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, 
IModel, List)
         */
-       public RadioChoice(final String id, IModel<T> model, final List<T> 
choices)
+       public RadioChoice(final String id, IModel<T> model, final List<? 
extends T> choices)
        {
                super(id, model, choices);
        }
@@ -218,7 +218,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel,
         *      List,IChoiceRenderer)
         */
-       public RadioChoice(final String id, IModel<T> model, final List<T> 
choices,
+       public RadioChoice(final String id, IModel<T> model, final List<? 
extends T> choices,
                final IChoiceRenderer<T> renderer)
        {
                super(id, model, choices, renderer);
@@ -234,7 +234,7 @@
         * @see org.apache.wicket.Component#Component(String)
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel)
         */
-       public RadioChoice(String id, IModel<List<? extends T>> choices)
+       public RadioChoice(String id, IModel<? extends List<? extends T>> 
choices)
        {
                super(id, choices);
        }
@@ -251,7 +251,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, 
IModel,IModel)
         * @see org.apache.wicket.Component#Component(String, IModel)
         */
-       public RadioChoice(String id, IModel<T> model, IModel<List<? extends 
T>> choices)
+       public RadioChoice(String id, IModel<T> model, IModel<? extends List<? 
extends T>> choices)
        {
                super(id, model, choices);
        }
@@ -269,7 +269,7 @@
         *      IModel,IChoiceRenderer)
         * @see org.apache.wicket.Component#Component(String)
         */
-       public RadioChoice(String id, IModel<List<? extends T>> choices, 
IChoiceRenderer<T> renderer)
+       public RadioChoice(String id, IModel<? extends List<? extends T>> 
choices, IChoiceRenderer<T> renderer)
        {
                super(id, choices, renderer);
        }
@@ -290,7 +290,7 @@
         * @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel,
         *      IModel,IChoiceRenderer)
         */
-       public RadioChoice(String id, IModel<T> model, IModel<List<? extends 
T>> choices,
+       public RadioChoice(String id, IModel<T> model, IModel<? extends List<? 
extends T>> choices,
                IChoiceRenderer<T> renderer)
        {
                super(id, model, choices, renderer);

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java
 Fri Apr 24 08:53:10 2009
@@ -79,7 +79,7 @@
  * instance itself does not correspond to any markup, however, the generated 
ListItems do.<br/>
  * 
  * This means that methods like {...@link #setRenderBodyOnly(boolean)} and
- * {...@link #add(org.apache.wicket.behavior.IBehavior...)} should be invoked 
on the {...@link ListItem}
+ * {...@link #add(org.apache.wicket.behavior.IBehavior[])} should be invoked 
on the {...@link ListItem}
  * that is given in {...@link #populateItem(ListItem)} method.
  * </p>
  * 
@@ -137,7 +137,7 @@
         * @param model
         * @see org.apache.wicket.Component#Component(String, IModel)
         */
-       public ListView(final String id, final IModel<List<T>> model)
+       public ListView(final String id, final IModel<? extends List<? extends 
T>> model)
        {
                super(id, model);
 
@@ -159,9 +159,9 @@
         *            List to cast to Serializable
         * @see org.apache.wicket.Component#Component(String, IModel)
         */
-       public ListView(final String id, final List<T> list)
+       public ListView(final String id, final List<? extends T> list)
        {
-               this(id, new ListModel<T>(list));
+               this(id, Model.of(list));
        }
 
        /**
@@ -172,9 +172,9 @@
         * @return The list of items in this list view.
         */
        @SuppressWarnings("unchecked")
-       public final List<T> getList()
+       public final List<? extends T> getList()
        {
-               final List<T> list = (List<T>)getDefaultModelObject();
+               final List<? extends T> list = (List<? extends 
T>)getDefaultModelObject();
                if (list == null)
                {
                        return Collections.emptyList();
@@ -395,7 +395,7 @@
                                        @Override
                                        public void undo()
                                        {
-                                               getList().add(oldIndex, 
removedObject);
+                                               
((List<T>)getList()).add(oldIndex, removedObject);
                                        }
 
                                });
@@ -419,7 +419,7 @@
         *            The list for the new model. The list must implement 
{...@link Serializable}.
         * @return This for chaining
         */
-       public ListView<T> setList(List<T> list)
+       public ListView<T> setList(List<? extends T> list)
        {
                setDefaultModel(Model.of(list));
                return this;
@@ -497,7 +497,7 @@
         *            The list item index
         * @return The ListItemModel created
         */
-       protected IModel<T> getListItemModel(final IModel<List<T>> 
listViewModel, final int index)
+       protected IModel<T> getListItemModel(final IModel<? extends List<T>> 
listViewModel, final int index)
        {
                return new ListItemModel<T>(this, index);
        }
@@ -678,9 +678,9 @@
         * @return model
         */
        @SuppressWarnings("unchecked")
-       public final IModel<List<T>> getModel()
+       public final IModel<? extends List<T>> getModel()
        {
-               return (IModel<List<T>>)getDefaultModel();
+               return (IModel<? extends List<T>>)getDefaultModel();
        }
 
        /**
@@ -688,7 +688,7 @@
         * 
         * @param model
         */
-       public final void setModel(IModel<List<T>> model)
+       public final void setModel(IModel<? extends List<T>> model)
        {
                setDefaultModel(model);
        }

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PageableListView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PageableListView.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PageableListView.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PageableListView.java
 Fri Apr 24 08:53:10 2009
@@ -52,7 +52,7 @@
         * @param rowsPerPage
         *            Number of rows to show on a page
         */
-       public PageableListView(final String id, final IModel<List<T>> model, 
int rowsPerPage)
+       public PageableListView(final String id, final IModel<? extends List<? 
extends T>> model, int rowsPerPage)
        {
                super(id, model);
                this.rowsPerPage = rowsPerPage;
@@ -70,7 +70,7 @@
         *            Number of rows to show on a page
         * @see ListView#ListView(String, List)
         */
-       public PageableListView(final String id, final List<T> list, final int 
rowsPerPage)
+       public PageableListView(final String id, final List<? extends T> list, 
final int rowsPerPage)
        {
                super(id, list);
                this.rowsPerPage = rowsPerPage;

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PropertyListView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PropertyListView.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PropertyListView.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/list/PropertyListView.java
 Fri Apr 24 08:53:10 2009
@@ -57,7 +57,7 @@
         * @param model
         *            wrapping a List
         */
-       public PropertyListView(final String id, final IModel<List<T>> model)
+       public PropertyListView(final String id, final IModel<? extends List<? 
extends T>> model)
        {
                super(id, model);
        }
@@ -71,7 +71,7 @@
         * @param list
         *            unmodeled List
         */
-       public PropertyListView(final String id, final List<T> list)
+       public PropertyListView(final String id, final List<? extends T> list)
        {
                super(id, list);
        }
@@ -84,7 +84,7 @@
         * @return a CompoundPropertyModel wrapping a ListItemModel
         */
        @Override
-       protected IModel<T> getListItemModel(final IModel<List<T>> model, final 
int index)
+       protected IModel<T> getListItemModel(final IModel<? extends List<T>> 
model, final int index)
        {
                return new 
CompoundPropertyModel<T>(super.getListItemModel(model, index));
        }

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java?rev=768227&r1=768226&r2=768227&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java
 Fri Apr 24 08:53:10 2009
@@ -74,7 +74,7 @@
         * @param model
         * @see org.apache.wicket.Component#Component(String, IModel)
         */
-       public AbstractPageableView(String id, IModel<Collection<T>> model)
+       public AbstractPageableView(String id, IModel<? extends Collection<? 
extends T>> model)
        {
                super(id, model);
                clearCachedItemCount();


Reply via email to