com.vaadin.ui.renderers.

Class ClickableRenderer<T,​V>

    • Constructor Detail

      • ClickableRenderer

        protected ClickableRenderer​(Class<V> presentationType)

        Creates a new clickable renderer with the given presentation type. No null representation will be used.

        Parameters:

        presentationType - the data type that this renderer displays, not null

      • ClickableRenderer

        protected ClickableRenderer​(Class<V> presentationType,
                                    String nullRepresentation)

        Creates a new clickable renderer with the given presentation type and null representation.

        Parameters:

        presentationType - the data type that this renderer displays, not null

        nullRepresentation - a string that will be sent to the client instead of a regular value in case the actual cell value is null. May be null.

    • Method Detail

      • addClickListener

        public Registration addClickListener​(ClickableRenderer.RendererClickListener<T> listener)

        Adds a click listener to this button renderer. The listener is invoked every time one of the buttons rendered by this renderer is clicked.

        Parameters:

        listener - the click listener to be added, not null

        Since:

        8.0

      • getState

        protected ClickableRendererState getState()

        Description copied from class: AbstractClientConnector

        Returns the shared state for this connector. The shared state object is shared between the server connector and the client connector. Changes are only communicated from the server to the client and not in the other direction.

        As a side effect, marks the connector dirty so any changes done to the state will be sent to the client. Use getState(false) to avoid marking the connector as dirty.

        Overrides:

        getState in class AbstractRenderer<T,​V>

        Returns:

        The shared state for this connector. Never null.