Wednesday, November 2, 2011

obtain class with only short class name at hand

If you use packages in grails it's sometimes not easy to resolve a domain class, e.g. if you only have the short class name "gene" in your params when you would actually need "package.name.gene". Here is how I managed to resolve the problem:

grailsApplication.getArtefactByLogicalPropertyName("Domain", domainName.toString().toLowerCase())

No comments:

Post a Comment