appln learnings

 Invoke REST api

  • Define data structure in Model js
  • Define callback function in model js that copies the data to JS data structure.
  • call DataProvider function to get the data
  • DataProvider.js invokes REST api and calls the call back function on success
  • Refer the Model datastructure in UI

 Translations

  • In js/resources/nls/root 
    • define the languages that are supported
    • Create js files with message name & value pair 
  • Refer the message in resource directory in model js
          self.warningText = ko.observable(oj.Translations.getTranslatedString('oj-message.warning'));
  • Use the model observable variable in the html files
 

 

Comments