use of io.jmix.ui.action.ItemTrackingAction in project jmix by jmix-framework.
the class EmailTemplateBrowse method onBeforeShow.
@Subscribe
public void onBeforeShow(BeforeShowEvent event) {
Action sendAction = new ItemTrackingAction("sendAction").withHandler(actionPerformedEvent -> onSendEmailClick());
emailTemplatesTable.addAction(sendAction);
sendButton.setAction(sendAction);
createFromDesignerAction.setNewEntitySupplier(() -> metadata.create(JsonEmailTemplate.class));
createFromDesignerAction.setScreenId(metadata.getClass(JsonEmailTemplate.class).getName() + ".edit");
createFromReportAction.setNewEntitySupplier(() -> metadata.create(ReportEmailTemplate.class));
createFromReportAction.setScreenId(metadata.getClass(ReportEmailTemplate.class).getName() + ".edit");
groupsButton.setEnabled(isGroupsButtonPermitted());
blocksButton.setEnabled(isBlocksButtonPermitted());
}
Aggregations