com.vaadin.ui.

Class Grid.DetailsManager<T>

    • Constructor Detail

      • DetailsManager

        public DetailsManager()
    • Method Detail

      • setDetailsGenerator

        public void setDetailsGenerator​(DetailsGenerator<T> generator)

        Sets the details component generator.

        Parameters:

        generator - the generator for details components

      • generateData

        public void generateData​(T item,
                                 elemental.json.JsonObject jsonObject)

        Description copied from interface: DataGenerator

        Adds custom data for the given item to its serialized JsonObject representation. This JSON object will be sent to client-side DataProvider.

        Parameters:

        item - the data item being serialized

        jsonObject - the JSON object being sent to the client

      • destroyData

        public void destroyData​(T item)

        Description copied from interface: DataGenerator

        Informs the DataGenerator that the given data item has been dropped and is no longer needed. This method should clean up any unneeded information stored for this item.

        Parameters:

        item - the dropped data item

      • setDetailsVisible

        public void setDetailsVisible​(T item,
                                      boolean visible)

        Sets the visibility of details component for given item.

        Parameters:

        item - the item to show details for

        visible - true if details component should be visible; false if it should be hidden

      • isDetailsVisible

        public boolean isDetailsVisible​(T item)

        Returns the visibility of details component for given item.

        Parameters:

        item - the item to show details for

        Returns:

        true if details component should be visible; false if it should be hidden

      • getState

        protected DetailsManagerState 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 Grid.AbstractGridExtension<T>

        Returns:

        The shared state for this connector. Never null.