This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Using listviews
Skip to end of metadata
Go to start of metadata


When using ListViews in forms, you have to be careful that you set the reuseItems property of the ListView to true (it is false by default). If you don't do this, the components are removed and added again (new instances) everytime, and you will not see any invalid input if your form did not validate.

Set this property e.g. like:

private final class MyListView extends ListView
{
	private MyListView(String id)
	{
		super(id);
		setReuseItems(true);
	}
...

If you need to delete items from the list don't forget to call detach() after the deletion is made:

  item.add(new Link("delete") {
         @Override public void onClick() {
                 myDao.delete(item.getModelObject());
                 listview.detach();
         }
  });
  • No labels