Store cookies using PushMode Automatic or Manual

Hey!

I’m trying to store some data as a cookie (user remember data in login form), but when it comes to call addUser method of VaadinResponse, it throws me a NPE, as VaadinResponse is null (as I’ve PushMode set to Manual)…

I’ve read something out there (like in
here
and in a ticket on vaadin trac whose url I don’t remember), but there is no “formal” solution… Someone suggested to disable PushMode, store cookie, and then enable the push mode again (but I don’t know how to do it programmatically, without the usage of annotations).

Thanks for your help!