use of test_support.entity.petclinic.Owner in project jmix by jmix-framework.
the class DlcBaseTestScreen method ownersDlLoadDelegate.
@Install(to = "ownersDl", target = Target.DATA_LOADER)
private List<Owner> ownersDlLoadDelegate(LoadContext<Owner> loadContext) {
events.add(new LoadEvent("ownersDl", loadContext));
List<Owner> list = new ArrayList<>();
Owner owner = metadata.create(Owner.class);
owner.setName("Joe");
list.add(owner);
if (loadContext.getQuery().getParameters().isEmpty()) {
owner = metadata.create(Owner.class);
owner.setName("Jane");
list.add(owner);
}
return list;
}