How to read query parameters in a @PreserveOnRefresh application

I’m upgrading a Vaadin 6.8 application to 7. This is the first step, where I just want to get things working, which is what might explain this slightly strange question.

I have a @PreserveOnRefresh which is used as follows:

  • User opens UI and, at some point, clicks on a buy button
  • User is redirected to PayPal for payment
  • After payment, the user is redirect back to the same initial UI, but with query parameters added
  • A Window is added to the UI to show the result of the transaction

In 6.8, I used a ParameterHandler to handle the query parameters and update the UI if everything went well.


What would be the way to do this in Vaadin 7?

I’ve already tried to do this with a RequestHandler, but I can’t get the last step (update the UI) to work correctly.

For those who might stumble upon this post in the future. The RequestHandler seems to be the right way to do this. After some more debugging, I found that the reason it wasn’t working for me was this problem: https://vaadin.com/forum/#!/thread/3471627

For Vaadin to retrieve the correct UI, it uses the window.name attribute, which is changed by PayPal (into “superDaddy” … yes, really)