* Igor Vaynberg:

> > Also, now  if instead of removing  one row at a  time you want
> > to  remove  a selection  of  rows  using a  CheckGroup,  there
> > is  no way  to  determine  the checked  rows,  unless you  add
> > a  CheckGroup.getSelection() method  that  returns  a list  of
> > checked checkboxes, WICKET-79 provides such a feature.
>
> CheckGroup.convert(); CheckGroup.getConvertedValue();

getConvertedInput() you mean?

getConvertedInput() iterates  over all child checkboxes  (of class
Check), and it stores checkbox.getModelObject() in a List.

Basically    the   patch    in    WICKET-79    reuses   most    of
getConvertedInput()  in a  new  method  called getSelection()  but
returns a  list of  checkboxes instead of  a list  of checkboxes's
model objects, this is more generic.

Providing  access to  the  checked checkboxes  directly allows  to
do  checkbox.getParent() to  get  the ListItem.   And getting  the
ListItems  allows  for example  to  modify  the structure  of  the
ListView for  adding, removing and  moving rows.  Why would  it be
mandatory to  use a  list of  business models,  when one  wants to
access a list of Wicket Components?

What I'm trying to do currently with Wicket is to implement a very
common  type of  widget  that  we are  used  to  with Cocoon:  the
repeater,  which comes  with  built-in facilities  for removing  a
selection of  rows, adding  rows, and moving  them.  Surprisingly,
Wicket is not good at that.

See for yourself the repeater widget on the Cocoon demo site:
http://cocoon.zones.apache.org/demos/21branch/samples/blocks/forms/do-dynaRepeater.flow

Do you have such an example in Wicket?
-- 
     Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

Reply via email to