Search in sources :

Example 1 with Owner

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;
}
Also used : Owner(test_support.entity.petclinic.Owner) ArrayList(java.util.ArrayList) Install(io.jmix.ui.screen.Install)

Aggregations

Install (io.jmix.ui.screen.Install)1 ArrayList (java.util.ArrayList)1 Owner (test_support.entity.petclinic.Owner)1