public void registerDetails(final AbstractGrid<?>.DetailsSupport details) {
        grid.addSelectionListener(event -> {
            final Long masterId = (Long) event.getSelected().stream().findFirst().orElse(null);
            details.populateMasterDataAndRecalculateContainer(masterId);
        });
    }
public void registerDetails ( final AbstractGrid < ? > . DetailsSupport details ) { grid . addSelectionListener ( event -> { final Long masterId = ( Long ) event . getSelected ( ) . stream ( ) . findFirst ( ) . orElse ( null ) ; details . populateMasterDataAndRecalculateContainer ( masterId ) ; } ) ; }
Registers the selection of this grid as master for another grid that
displays the details.

@param details
the details of another grid the selection of this grid should
be registered for as master.