Skip to content

Instantly share code, notes, and snippets.

@mallim
Created September 6, 2013 11:24
Show Gist options
  • Save mallim/6462555 to your computer and use it in GitHub Desktop.
Save mallim/6462555 to your computer and use it in GitHub Desktop.
How to get a string from java backend and pass it to backbone model or collection?
// Within a jsp page
<script>
var options.saved_values=JSON.parse('${it.json_string_from_Java}');
var theBackboneModel = new TheBackboneModel(options.saved_values,{parse:true});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment