Class ErrorView

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
it.uniupo.simnova.views.home.ErrorView
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.HasErrorParameter<com.vaadin.flow.router.NotFoundException>, Serializable

public class ErrorView extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout> implements com.vaadin.flow.router.HasErrorParameter<com.vaadin.flow.router.NotFoundException>
Vista di errore personalizzata per la gestione delle pagine non trovate (errore 404). Mostra un messaggio di errore, un logo animato e un pulsante per tornare alla homepage.
Version:
1.0
Author:
Alessandro Zappatore
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ErrorView(FileStorageService fileStorageService)
    Costruttore della vista di errore.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    setErrorParameter(com.vaadin.flow.router.BeforeEnterEvent event, com.vaadin.flow.router.ErrorParameter<com.vaadin.flow.router.NotFoundException> parameter)
    Imposta il parametro di errore per la rotta non trovata (404).

    Methods inherited from class com.vaadin.flow.component.Composite

    getChildren, getContent, getElement, initContent

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Constructor Details

    • ErrorView

      public ErrorView(FileStorageService fileStorageService)
      Costruttore della vista di errore. Inizializza il layout della pagina con header, logo animato, titolo, messaggio e pulsante per tornare alla home.
      Parameters:
      fileStorageService - Servizio per la gestione dei file, utilizzato per l'AppHeader.
  • Method Details

    • setErrorParameter

      public int setErrorParameter(com.vaadin.flow.router.BeforeEnterEvent event, com.vaadin.flow.router.ErrorParameter<com.vaadin.flow.router.NotFoundException> parameter)
      Imposta il parametro di errore per la rotta non trovata (404). Se un messaggio personalizzato รจ fornito, lo visualizza.
      Specified by:
      setErrorParameter in interface com.vaadin.flow.router.HasErrorParameter<com.vaadin.flow.router.NotFoundException>
      Parameters:
      event - L'evento di navigazione.
      parameter - Il parametro di errore contenente l'eccezione e un eventuale messaggio personalizzato.
      Returns:
      Il codice di stato HTTP 404 (Not Found).