Skip to content

Instantly share code, notes, and snippets.

@enachb
Created March 3, 2010 08:13
Show Gist options
  • Select an option

  • Save enachb/320431 to your computer and use it in GitHub Desktop.

Select an option

Save enachb/320431 to your computer and use it in GitHub Desktop.
public class SiteMap {
static void main(String[] args) {
def binding = new Binding();
def products = [new Product(name:"ProdName1",productId:"P1000"), new Product(name:"ProdName2",productId:"P1001")]
binding.setVariable "products", products
def shell = new GroovyShell(binding)
String siteMap = shell.evaluate(new File('grails-app/conf/SiteMapConfig.groovy'))
println siteMap
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment