This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <title>Vogogo Sample Form</title> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
| <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script> | |
| <script type="text/javascript" src="https://api.vogogo.com/vogogo.js/"></script> | |
| <script type="text/javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.codehaus.groovy.control.* | |
| // Compile a closure producing class | |
| cu = new CompilationUnit(); | |
| cu.addSource("ClosureFactory.groovy", "public class ClosureFactory { public Closure getClosure() { return {message -> println message} }; }"); | |
| cu.compile(); | |
| // Get the closure, the closure class bytes and invoke the closure. | |
| clazz = Class.forName("ClosureFactory"); | |
| clozure = clazz.newInstance().getClosure(); | |
| clozureClass = clozure.getClass(); |