Class DraftListView

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<ViewLayout>
io.jmix.flowui.view.View<ViewLayout>
io.jmix.flowui.view.StandardView
io.jmix.uirecoveryflowui.view.draft.DraftListView
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, com.vaadin.flow.router.AfterNavigationObserver, com.vaadin.flow.router.BeforeEnterObserver, com.vaadin.flow.router.BeforeLeaveObserver, com.vaadin.flow.router.HasDynamicTitle, com.vaadin.flow.router.internal.AfterNavigationHandler, com.vaadin.flow.router.internal.BeforeEnterHandler, com.vaadin.flow.router.internal.BeforeLeaveHandler, FacetOwner, FragmentOwner, Serializable

@Route(value="uirec/drafts", layout=DefaultMainViewParent.class) @ViewController(id="uirec_DraftListView") @ViewDescriptor(path="draft-list-view.xml") @PermitAll public class DraftListView extends StandardView
Lists the current user's unsaved drafts as cards, each linking to the view the draft belongs to, so that opening it offers the draft back through that view's drafts facet.

The application shows this view right after login when jmix.uirecovery.drafts.show-on-login is enabled and the user has drafts; it is also reachable by its own route at any time, and by every authenticated user.

See Also:
  • Field Details

  • Constructor Details

    • DraftListView

      public DraftListView()
  • Method Details

    • onBeforeShow

      @Subscribe public void onBeforeShow(View.BeforeShowEvent event)
    • onContinueButtonClick

      @Subscribe("continueButton") public void onContinueButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    • onDiscardAllButtonClick

      @Subscribe("discardAllButton") public void onDiscardAllButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    • reloadDrafts

      protected void reloadDrafts()
      Reads the drafts again and rebuilds the cards. The hint and the discard-all button are shown only while there is something to act on, and the empty text only while there is not.
    • discardDraft

      public void discardDraft(DraftInfo info)
      Deletes one listed draft and rebuilds the list. Called by a card's discard button.
      Parameters:
      info - the draft to discard
    • discardAll

      protected void discardAll()