> Markdown version of [Observable Vaadin events](https://vaadin.com/docs/v10/flow/cdi/tutorial-cdi-events). Section index: [llms.txt](https://vaadin.com/docs/v10/flow/llms.txt)

# Observable Vaadin events

The add-on publishes many Vaadin events to CDI. You don’t have to register a listener, just use an observer to handle these:

- `ServiceInitEvent` See [VaadinServiceInitListener](https://vaadin.com/docs/v10/flow/advanced/tutorial-service-init-listener.md) for details.

- `PollEvent`

- `BeforeEnterEvent`

- `BeforeLeaveEvent`

- `AfterNavigationEvent` See [Navigation Lifecycle](https://vaadin.com/docs/v10/flow/routing/tutorial-routing-lifecycle.md) for details about navigation events.

- `UIInitEvent` See [UIInitListener](https://vaadin.com/docs/v10/flow/advanced/tutorial-ui-init-listener.md) for details.

- `SessionInitEvent`

- `SessionDestroyEvent`

- `ServiceDestroyEvent`

  > **Warning:** During application shutdown it is implementation specific, whether `ServiceDestroyEvent` works with CDI or not.

An example of a bootstrap page customizer:

```java
public class BootstrapCustomizer {

    private void onServiceInit(@Observes ServiceInitEvent serviceInitEvent) {
        serviceInitEvent.addBootstrapListener(this::modifyBootstrapPage);
    }

    private void modifyBootstrapPage(BootstrapPageResponse response) {
        response.getDocument().body().append(
                "<p>By CDI add-on</p>");
    }
}
```
