Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<script>
    var jq = jQuery;
</script>

You can transform your groovy objects to be used in your javascript; 

Code Block
<script>
	// pass a list of names from a list into a javascriptMethod
    javascriptMethod("<% list.each { d -> %>${d.name}<% } %>".split(","))
</script>


You may be wondering what Groovy code is like. 99% of legal Java code is also legal Groovy code, but Groovy gives you a bunch of extra language constructs which allow the code to be a lot cleaner and shorter.

...