Search in sources :

Example 6 with ItemTrackingAction

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());
}
Also used : JsonEmailTemplate(io.jmix.emailtemplates.entity.JsonEmailTemplate) ItemTrackingAction(io.jmix.ui.action.ItemTrackingAction) CreateAction(io.jmix.ui.action.list.CreateAction) Action(io.jmix.ui.action.Action) ItemTrackingAction(io.jmix.ui.action.ItemTrackingAction) ReportEmailTemplate(io.jmix.emailtemplates.entity.ReportEmailTemplate)

Aggregations

ItemTrackingAction (io.jmix.ui.action.ItemTrackingAction)6 Action (io.jmix.ui.action.Action)4 BaseAction (io.jmix.ui.action.BaseAction)2 ListAction (io.jmix.ui.action.ListAction)2 EntityOp (io.jmix.core.security.EntityOp)1 EmailAttachment (io.jmix.email.EmailAttachment)1 JsonEmailTemplate (io.jmix.emailtemplates.entity.JsonEmailTemplate)1 ReportEmailTemplate (io.jmix.emailtemplates.entity.ReportEmailTemplate)1 Notifications (io.jmix.ui.Notifications)1 ScreenBuilders (io.jmix.ui.ScreenBuilders)1 UiComponents (io.jmix.ui.UiComponents)1 CreateAction (io.jmix.ui.action.list.CreateAction)1 io.jmix.ui.component (io.jmix.ui.component)1 ContainerTableItems (io.jmix.ui.component.data.table.ContainerTableItems)1 JmixIcon (io.jmix.ui.icon.JmixIcon)1 CollectionContainer (io.jmix.ui.model.CollectionContainer)1 io.jmix.ui.screen (io.jmix.ui.screen)1 ThemeClassNames (io.jmix.ui.theme.ThemeClassNames)1 ExcelExportAction (io.jmix.uiexport.action.ExcelExportAction)1 Collection (java.util.Collection)1