vaadin-touchkit

How can I force Vaadin client engine to retry sending requests to the server?

六月ゝ 毕业季﹏ 提交于 2020-01-02 05:24:10
问题 I'm experimenting with the Vaadin Java framework at the moment and I've noticed that the client engine does not retry sending requests to the server. When mobile internet network is weak or inconsistent it would be good to keep retrying sending of requests rather than giving up. Does any one know how to achieve this in Vaadin? 回答1: Extending ApplicationConnection and overriding doAjaxRequest should be enough to achieve what you're trying to do. Something like this: public class

How to set value on click of link in vaadin

爷,独闯天下 提交于 2019-12-12 10:17:09
问题 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