use of io.jmix.ui.screen.Install in project jmix by jmix-framework.
the class DlcBaseScreen 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;
}
use of io.jmix.ui.screen.Install in project jmix by jmix-framework.
the class DlcBaseScreen method petsDlLoadDelegate.
@Install(to = "petsDl", target = Target.DATA_LOADER)
private List<Pet> petsDlLoadDelegate(LoadContext<Pet> loadContext) {
events.add(new LoadEvent("petsDl", loadContext));
Pet pet = metadata.create(Pet.class);
pet.setName("Misty");
return Collections.singletonList(pet);
}
use of io.jmix.ui.screen.Install in project jmix by jmix-framework.
the class DlcBaseTestScreen method petsDlLoadDelegate.
@Install(to = "petsDl", target = Target.DATA_LOADER)
private List<Pet> petsDlLoadDelegate(LoadContext<Pet> loadContext) {
events.add(new LoadEvent("petsDl", loadContext));
Pet pet = metadata.create(Pet.class);
pet.setName("Misty");
return Collections.singletonList(pet);
}
use of io.jmix.ui.screen.Install in project jmix by jmix-framework.
the class TableEditFragment method columnsTableRemoveAfterActionPerformedHandler.
@Install(to = "columnsTable.remove", subject = "afterActionPerformedHandler")
protected void columnsTableRemoveAfterActionPerformedHandler(RemoveOperation.AfterActionPerformedEvent<TemplateTableColumn> event) {
TemplateTableColumn deletedColumn = event.getItems().iterator().next();
int deletedPosition = deletedColumn.getPosition();
for (TemplateTableColumn templateTableColumn : tableColumnsDc.getItems()) {
if (templateTableColumn.getPosition() > deletedPosition) {
int currentPosition = templateTableColumn.getPosition();
templateTableColumn.setPosition(currentPosition - 1);
}
}
}
use of io.jmix.ui.screen.Install in project jmix by jmix-framework.
the class TableEditFragment method bandsTableRemoveAfterActionPerformedHandler.
@Install(to = "bandsTable.remove", subject = "afterActionPerformedHandler")
protected void bandsTableRemoveAfterActionPerformedHandler(RemoveOperation.AfterActionPerformedEvent<TemplateTableBand> event) {
TemplateTableBand deletedColumn = event.getItems().iterator().next();
int deletedPosition = deletedColumn.getPosition();
for (TemplateTableBand templateTableBand : tableBandsDc.getItems()) {
if (templateTableBand.getPosition() > deletedPosition) {
int currentPosition = templateTableBand.getPosition();
templateTableBand.setPosition(currentPosition - 1);
}
}
}
Aggregations