Class AbstractBlockView

java.lang.Object
com.vaadin.flow.component.Component
All Implemented Interfaces:
Executable, Reentrant, HasLogic, Transactional, ClickHandler, CloseableView, ExecutableView, ValueChangeHandler, com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasValue.ValueChangeListener, Serializable, Runnable, EventListener
Direct Known Subclasses:
BlockView

public abstract class AbstractBlockView extends TemplateView implements Transactional, CloseableView
AbstractBlockView serves as the foundational class for creating specific block views in applications. It is designed to manage and visualize blocks and associated data within a transactional and closeable context. This class also integrates with the application's polling mechanisms, providing periodic updates and relevant functionalities for managing block-related operations.

Key Features:

- Automatically integrates refresher mechanisms to update block data periodically. - Provides a template for rendering blocks, requiring subclasses to implement specific methods for block representation. - Manages site association for blocks with appropriate checks and updates. - Handles resources and polling cleanup upon view termination.

Core Responsibilities:

- Initiates the application menu closure and polling services. - Refreshes the block's status using a polling mechanism. - Offers utility methods to retrieve or format the last update time.

Subclasses are required to implement methods like drawBlocks() and reloadBlock(Id blockId) to define specific rendering and reloading logic.

Implements: - Transactional to support transactional operations. - CloseableView to handle resources and cleanup processes.

Extends: - TemplateView to use templating support for the UI.

See Also: