I’m trying to use RatingStars component as follows
RatingStars rs = new RatingStars();
rs.setId("ratingstars");
rs.setBuffered(true);
layout.addComponent(rs);
and then later when pressed a button I’m looping through layout and pick out the component that has
the same id. According to debugger I’ve found the same component I was hoping for, but if I try to get
the value out of it
Double value = ((RatingStars) component).getValue();
What I tried to do is the same thing as Teemu had in his code
userRating.addValueChangeListener(event -> {
Double value = event.getValue();
});
but it throws an error because event belongs to com.vaadin.data.Property.ValueChangeEvent class and therefore can not give the value. It merely offers me the options anyone could do with java.lang.Object.