ibm mobilefirst - Worklight - getUserPref doesn't persist/load back? -


I am trying to keep some data for the user in this WL App:

 < Code> WL.Client.setUserPref ('foo', 'bar'); Retrieve it using  

and

  WL.Client.getUserPref ('key');  

My goal is Windows 8.1 with the latest workstation studio (6.2.0.01-20141015).

With a user logging in, I have tested it in: <

  • Set up a user pref ...
  • Logged out
  • Close the window
  • Re-logged in
  • Return user prefix (zero)
  • < / Ul>

    Using Developer I can see the console in Chrome that was called to save the priority, and confirmed that it was set by getUserPref calling it.

    I have done a lot of testing with Visual Studio 2013 by previewing the app and in this situation commands are being executed from the JS console.

    Am I missing here?

    I knew that connecting before getting authenticity and getting priorities means connecting Is, i.e.:

      WL.Cient.connect ({onSuccess: successFunction, onFailure: failureFunction}); Var myPref = WL.Client.getUserPref ("myPref");  

    This should do the trick.


    Comments

    Popular posts from this blog

    java - Can't add JTree to JPanel of a JInternalFrame -

    javascript - data.match(var) not working it seems -

    javascript - How can I pause a jQuery .each() loop, while waiting for user input? -