You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Peter Miklosko <pe...@gmail.com> on 2011/03/22 11:15:59 UTC

Keep data in ListView of Form while adding or removing rows

In my project I have requirement for dynamic type of form where user can add
or remove a "project row info".
To keep form data for new entries that hasn't been added to database while
adding another new row I used following article
http://www.oktech.hu/kb/adding-and-removing-rows-wicket-listview-via-ajax
This does work fine for adding new row into form. However it doesn't work
for removing rows.

Considering following scenario: in ListView I have already two projects A
and B. Press add row will add new entry into list, project C, where user
have to fill in data. After this I would like to remove B. One I hit link
project B is removed from ListView, project C is there with some values as
null, however the browser view is showing project A and B. It would be easy
to replace links with checkboxes and handle delete on whole submit, but I
would like to achieve dynamic approach as described above.

Can somebody advise?

Thank you

Peter