Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-5622

Create a common way to show notifications

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Neutral
    • None
    • None
    • None
    • None

    Description

      Actually, when we want to show a notification, we call directly to com.vaadin.ui.Notification. Would be nice offer a wrap around it for users and other magnolia modules, something like:

       

      public class Notifications {
        private final SimpleTranslator i18n;
        
        @Inject
        public Notifications(SimpleTranslator i18n) {
          this.i18n = i18n;
        }
        public void showError(String key) {
          Notification.show(i18n.translate(key), Notification.Type.ERROR_MESSAGE);
        }
        ....
      }

       

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jfranco Jorge Franco
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Task DoD