07-11-2012 11:06 PM
This problem might sound very strange.
I have written webworks app. which writes data to persistent store and retrieves it back.
The problem is that.I install the app and When I click the 'getFromStorage' button(in index.html) it successfully calls it extension. but nothing happens in the first execution. I mean invoke is not called, hence no subsequent methods are called.
But when i close the app & reopen & click on 'getFromStorage' button(in index.html) it successfuly stores & retrives the data. so i mean to say,, the app is working fine in the subsequent execusions.
I have set EventLogger to see what is hapennning, I see that the constructor 'DataFactory' is called followed by
Below is the gist how I am implementing it.
DataFactory() _myObj = new DataFactory();
_myObj.getFromStorage();// This calls
static Vector _data = new Vector();
some values are set to _data
Vector _vectorStore = (Vector) _store.getContents();
Any clue, what is going wrong and where?
Solved! Go to Solution.
07-12-2012 01:53 PM
I found the problem.
I was trying to store the Vector() object. But the contents of the Vector were not implemented by Persistable Interface.
Hence it was throwing NonPersistableObjectException.
So I implemented Persistable on the class (whose objects I was storing).
Now its working fine.