Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Questions to offline behaviour.

    Hi,

    1. There is a following explanation to the put(String key, Object value) method of the Offline class in smartgwt API:

    "Note that limitations in the underlying storage engines mean that only primitive values - Strings, numbers and booleans - can be stored. If you wish to store an Array or Object, you will have to serialize it to JSON first, and then eval it after retrieval to turn it back into an object."

    Should one understand it so, the value can be String, number, boolean or JSONObject? Or it meant one should convert his object into JSON String?

    2. How can one create an offline.manifest for the smartgwt-project? There are instructions on this page http://blog.isomorphic.com/offline-capability-in-smartclient-smart-gwt/. But the link http://blogs.sitepoint.com/2010/02/12/offline-web-application-tutorial/ with an explanation to the manifest is dead.

    Thank you in advance,
    -sipungora

    #2
    1. serializing to JSON turns Objects into Strings

    2. just Google "html5 manifest" there are many, many resources about this

    Comment


      #3
      > 2. just Google "html5 manifest" there are many, many resources about this

      Yes, there are many, many simple "Hello World" examples. But a new created SmartGWT Project contains ca. 1000 resource files after compiling and it is not so comfortable manual to insert all of them into offline.manifest. I don't found a good explanation about the automatically creation of the offline.manifest e.g. during compiling.

      Comment


        #4
        Automatic creation of HTML5 manifests isn't something built into either GWT or SmartGWT, but if you want to take this approach, Google "gwt automatically create html5 manifest during compilation" and there are some good starting points.

        Comment


          #5
          Offline DataSource

          Hello
          I'm building a 90% offline application. This is the scenario.
          A RestDataSource correctly loads data from a servlet.
          The DataSource is using offline storage (i.e. ds.setUseOfflineStorage(true) ), and it correctly stores data on HTML5 localStorage.
          Whole application is cached by browser using HTML5 application cache and it's then loaded from that instead from server.
          Application start in offline mode.

          I see that my RestDataSource doesn't load data from localStorage even if I try to do fetch o filter.
          Is this correct or it should loads data correctly ?

          Thank you.
          Last edited by fante76; 24 Jan 2013, 01:31.

          Comment

          Working...
          X