[30384] Palette does not clear its selected list when no selections are made.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/tapestry/branches/branch-3-0@243933 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/contrib/src/org/apache/tapestry/contrib/palette/Palette.java b/contrib/src/org/apache/tapestry/contrib/palette/Palette.java
index 8b4d394..330c312 100644
--- a/contrib/src/org/apache/tapestry/contrib/palette/Palette.java
+++ b/contrib/src/org/apache/tapestry/contrib/palette/Palette.java
@@ -206,9 +206,7 @@
* </pre>
*
* @author Howard Lewis Ship
- * @version $Id$
- *
- **/
+ */
public abstract class Palette extends BaseComponent implements IFormComponent
{
@@ -448,8 +446,8 @@
if (sortUser)
{
- Iterator i = selectedOptions.iterator();
- while (i.hasNext())
+ Iterator i = selectedOptions.iterator();
+ while (i.hasNext())
{
PaletteOption o = (PaletteOption) i.next();
selectedColumn.addOption(o);
@@ -479,8 +477,8 @@
int count = Tapestry.size(values);
- if (count == 0)
- return;
+ // Build a new ArrayList and fill it with the selected
+ // objects, if any.
List selected = new ArrayList(count);
IPropertySelectionModel model = getModel();
diff --git a/status.xml b/status.xml
index 6de4291..7e9e96d 100644
--- a/status.xml
+++ b/status.xml
@@ -266,6 +266,10 @@
Provide a public implementation of ITemplateParserDelegate.
</action>
+ <action type="fix" dev="HLS" fixes-bug="30384">
+ Palette does not clear its selected list when no selections are made.
+ </action>
+
</release>
<release version="3.0" date="Apr 18 2004">