Author: jcompagner
Date: Thu Aug  9 14:25:47 2007
New Revision: 564386

URL: http://svn.apache.org/viewvc?view=rev&rev=564386
Log:
choiced model should be tested if it must be wrapped

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java?view=diff&rev=564386&r1=564385&r2=564386
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
 Thu Aug  9 14:25:47 2007
@@ -149,7 +149,7 @@
        public AbstractChoice(final String id, final IModel choices, final 
IChoiceRenderer renderer)
        {
                super(id);
-               this.choices = choices;
+               this.choices = wrap(choices);
                setChoiceRenderer(renderer);
        }
 
@@ -186,7 +186,7 @@
                        final IChoiceRenderer renderer)
        {
                super(id, model);
-               this.choices = choices;
+               this.choices = wrap(choices);
                setChoiceRenderer(renderer);
        }
 
@@ -222,7 +222,7 @@
                                addStateChange(new ChoicesListChange());
                        }
                }
-               this.choices = choices;
+               this.choices = wrap(choices);
                return this;
        }
 
@@ -309,8 +309,9 @@
        protected abstract boolean isSelected(final Object object, int index, 
String selected);
 
        /**
-        * Gets whether the given value is disabled.  This default 
implementation always returns false.
-        *
+        * Gets whether the given value is disabled. This default implementation
+        * always returns false.
+        * 
         * @param object
         *            The object to check
         * @param index
@@ -320,18 +321,19 @@
         * @return Whether the given value represents the current selection
         */
        protected boolean isDisabled(final Object object, int index, String 
selected)
-    {
-        return false;
-    }
+       {
+               return false;
+       }
 
-    /**
+       /**
         * Handle the container's body.
         * 
         * @param markupStream
         *            The markup stream
         * @param openTag
         *            The open tag for the body
-        * @see org.apache.wicket.Component#onComponentTagBody(MarkupStream, 
ComponentTag)
+        * @see org.apache.wicket.Component#onComponentTagBody(MarkupStream,
+        *      ComponentTag)
         */
        protected void onComponentTagBody(final MarkupStream markupStream, 
final ComponentTag openTag)
        {
@@ -449,8 +451,8 @@
                 */
                public String toString()
                {
-                       return "ChoiceListChange[component: " + getPath() + ", 
old choices: " + oldChoices
-                                       + "]";
+                       return "ChoiceListChange[component: " + getPath() + ", 
old choices: " + oldChoices +
+                                       "]";
                }
 
 


Reply via email to