On 11/19/06, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:

* Igor Vaynberg:

>
> CheckGroup.convert(); CheckGroup.getConvertedValue();

getConvertedInput() you mean?


yes


[...]
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?


its called getModelObject() not getBusinessModelObject(), feel free to use
listitem instance as the model object.

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?



wicket works differently, you work with backing models not with components.
so instead of removing a row from the listview manually you would remove the
object from the list that backs the listview. listview is fragile, i have
said it time and time again, because it uses the index of an object in a
list as the primary key to identify the object which hardly ever works for
editing.

-igor


--
     Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

Reply via email to