How to set value on click of link in vaadin
问题 I am new to vaadin. I have one Link like Link link = new Link("", new ExternalResource(redirectURL)); my requirement is, I have to set value when user clicks the link. Can I add listener when user click the link. Or is there alternate ways of setting value if link is clicked. 回答1: To capture onClick on a link or a label, I always create a HorizontalLayout and put the component inside it: HorizontalLayout hor = new HorizontalLayout(); final Link link = new Link("Click on Me!", new