Acess localStorage html5 in Vaadin 8

Is it possible to access the localStorage of html5 in Vaadin 8? On the client side, obvious.

There is an add-on in the directory with support for vaadin 7 only, I tried to use it but it does not work.

Nobody knows?
Does anyone on the Vaadin team read this forum?

I did brief look into code, and it looks that it should be rather trivial to port it to Vaadin 8.

I would first create new maven based Vaadin 8 add-on archetype in Eclipse and then copy paste the existing code of the add-on to that. That may be enough, since only obvious thing I spotted in old add-on was that old Ivy project structure with widgetset metainfo is not directly compatible.

If you have someone in the community with enough knowledge to do so, I think it’s a very useful feature for everyone.
There are several uses cases:

  • Save user layout preferences
  • Password reminder
  • and what else the imagination allows.

One more feature that is quite “trivial” to implement it in Vaadin, but that is not implemented. I think this should be a priority of the Vaadin team, have someone to update these add-on … no use having a “piece” of functionality. Is this forcing you to be a paid customer?

Hi Jonas,

TouchKit has that feature and it is Apache 2 licenced these days. You could probably use it as such from there or spin it as a separate add-on (and make TouchKit use that as a dependency).

https://github.com/parttio/touchkit/blob/master/touchkit/src/main/java/org/vaadin/touchkit/extensions/LocalStorage.java

cheers,
matti

You could also try this new Vaadin 8 version of the ClientStorage add-on: https://vaadin.com/directory/component/clientstorage-add-on-for-vaadin-8/ (issues welcome: https://github.com/OlliTietavainenVaadin/v8-client-storage/issues )

Problem solved by Olli!
It generated a new add-on based on the old one that works perfect in my Vaadin 8 project, SpringBoot! Congratulations!

Thanks also to Matti for the suggestion of alternative!