package com.example.application.views.results; import com.example.application.navigation.Navigation; import com.vaadin.flow.component.html.Div; import com.vaadin.flow.component.html.Label; public class MatchView extends Div { private final Navigation navigation; private final Label label = new Label(); // private final ChessComService chessComService; // private final PlayerService playerService; // public ResultsViewRight(@Autowired ChessComService chessComService, @Autowired PlayerService playerService) { public MatchView(Navigation navigation) { this.navigation = navigation; navigation.addRunnableToBeRunAfterMatchSelection(()-> label.setText(navigation.getSelectedMatch().toString())); add(label); // this.chessComService = chessComService; // this.playerService = playerService; } }