Hi,

I currently have a typical  use-case where a delete button removes
a selection of rows from a table.  Typically, the delete button is
a  submit  button  with  setDefaultFormProcessing(true)  to  avoid
validation.

But in  this case,  I can't find  a way to  get the  checked rows.
Indeed CheckGroup.getConvertedInput() returns null as form has not
been yet validated.

Please see  the attached patch  and tell me if  it is worth  to be
part of Wicket.

TIA,
-- 
     Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/
Index: src/main/java/wicket/markup/html/form/CheckGroup.java
===================================================================
--- src/main/java/wicket/markup/html/form/CheckGroup.java       (revision 
462721)
+++ src/main/java/wicket/markup/html/form/CheckGroup.java       (working copy)
@@ -210,4 +210,10 @@
                return false;
        }
 
+       /**
+        * @return Collection of selected values
+        */
+       public Object getSelection() {
+               return convertValue(getInputAsArray());
+       }
 }

Reply via email to