Pero
Pero

Reputation: 794

GWT IndexedDB available or any update on this?

is there any update on GWT IndexedDB? Here are two projects of GWT IndexedDB but i dont know if this is usefull because these two projects seem to be dead?!

http://code.google.com/p/indexeddb-gwt/ http://code.google.com/p/gwt-indexeddb/

IS it possible to use GWT IndexedDB by JSNI? Has anybody experience with it?

Would like to learn and to use IndexedDB but dont know because iam using only GWT and not JavaScript. Please help!

Upvotes: 0

Views: 933

Answers (2)

Polla A. Fattah
Polla A. Fattah

Reputation: 829

I used java Maps (TreeMap) package to emulate indexedDB searching functions and GWT built-in html5 storage wrapper to store data offline in browser.

Upvotes: 0

Ümit
Ümit

Reputation: 17489

You can use any pure javascript/browser functaonlity from GWT using JSNI.

If youu look at the above linked Indexdb gwt libraries they do just that. They define JSO Overlay wrappers for the corresponding javascript objects. (see here as an example).

Alternatively you could also look into the Elemental library. I am not 100% sure but it might contain wrappers for IndexDB.

So you have 4 choices:

  1. Manually call the indexdb javascript functons using JSNI.
  2. Write your own wrapper using JSO and JSNI
  3. Use on of the indexdb GWT wrappers
  4. Use Elemental library.

Upvotes: 2

Related Questions