Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Sending params in vaddin refresher addon request.
We are using vaadin refresher addon in our application in header. The purpose of this refresher in header is to poll the server every minute to update the timestamp on UI. We also have a requirement to do the session timeout in one hour. As a result of this refresher on page header the session time out never happen.
I was exploring a way to send unique params with the refresher request to server which would help me in identifying the user initiated request and refresher initiated request. I googled a lot but didn't get any way to do so.
Has anyone faced the same issue. Is there any resolution to it.
Thanks in advance for sharing thoughts and solutions.
Thanks for replying in.
Actually, we have no of refreshers in our application with their dedicated purpose. I just gave an example of one of the refresher which is meant to update the timestamp
Please provide an input if we can send some parameters in refresher/user initiated ajax request .
pradeep sharma: Please provide an input if we can send some parameters in refresher/user initiated ajax request .
There is no API for this and the relevant parts of the framework are not really designed to be easily extensible in Vaadin 6. You can take a look at the end of ApplicationConnection.doUidlRequest() where parameters are added for the synchronous "closing browser" request and could be added for other asynchronous requests, but I don't think it would be easy to intercept and modify this behavior. On the server side, these parameters are processed in AbstractApplicationServlet.service(), also not designed for extensibility in Vaadin 6. Vaadin 7 will make at least the server side somewhat more flexible.
Note, though, that each message burst from the client to the server can contain multiple variable changes - even from different components - and a request can contain multiple bursts in some cases. Therefore, a request could - at least in theory - contain both a request from a Refresher (or a push add-on) and user-initiated updates from the client to the server.