1

How can I delete a list of entity with RequestFactory?

InstanceRequest<List<XProxy>, Void> remove();

Of course, this is not working, because the first parameter has to be like this: P extends BaseProxy; but is there a similar way?


I want to delete the selected entities of my CellTable from the database. And I am using MultiSelectionModel, and CheckboxCell.

ngspkinga
  • 421
  • 5
  • 16

1 Answers1

2

An InstanceRequest means that the method is an instance method on the domain method for the first type argument (similar to looking for a remove() on a List in what you tried).

You have to use a Request and pass the List as an argument to the method. The presence of a @ServiceLocator on the RequestContext will tell RequestFactory whether to look for a static or an instance method.

Request<Void> remove(List<XProxy> list);
Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164