Author: jbq Date: Thu Apr 19 08:31:54 2007 New Revision: 530458 URL: http://svn.apache.org/viewvc?view=rev&rev=530458 Log: WICKET-458 Palette requires a modifiable List
* Call getModel().setObject() like in ListMultipleChoice * Update Javadoc Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java?view=diff&rev=530458&r1=530457&r2=530458 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java Thu Apr 19 08:31:54 2007 @@ -28,11 +28,13 @@ import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; +import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.markup.html.form.IChoiceRenderer; import org.apache.wicket.markup.html.image.Image; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.markup.html.resources.StyleSheetReference; import org.apache.wicket.model.IModel; +import org.apache.wicket.model.Model; /** @@ -433,7 +435,13 @@ } /** - * update the model upon form processing + * The model object is assumed to be a Collection, and it is modified + * in-place. Then [EMAIL PROTECTED] Model#setObject(Object)} is called with the same + * instance: it allows the Model to be notified of changes even when + * [EMAIL PROTECTED] Model#getObject()} returns a different [EMAIL PROTECTED] Collection} at every + * invocation. + * + * @see FormComponent#updateModel() */ protected final void updateModel() { @@ -450,6 +458,7 @@ model.add(selectedChoice); } + getModel().setObject(model); } /**