Compiling the Vaadin widgetset with Grails
With version 7.1.15 of the Grails Vaadin 7 plugin you can compile the widgetset for Vaadin addons in a grailsy way.
I have put together a tutorial in the Vaadin wiki and uploaded a demo project.
If you are interrested in hiring a consultant for the effective use of open source software on an enterprise grade, take a look around in the About section to see, what I have to offer.
Various snippets or code parts I found useful, so I keep them here for reference.
With version 7.1.15 of the Grails Vaadin 7 plugin you can compile the widgetset for Vaadin addons in a grailsy way.
I have put together a tutorial in the Vaadin wiki and uploaded a demo project.
Easy way to add collate
for separting lists into rows with a certain size
class Groovy { List<List> collate(List list, Integer columns) { return list.collate(columns) } } class GroovyDialect extends AbstractDialect implements IExpressionEnhancingDialect { @Override Map<String, Object> getAdditionalExpressionObjects(IProcessingContext processingContext) { return [ groovy: new Groovy() ] } @Override String getPrefix() { return "groovy" } }
Add dialects to TemplateEngine (code based approach), see additionalDialects
in XML:
def templateEngine = new TemplateEngine().with{ // ... setAdditionalDialects([new GroovyDialect()] as Set<IDialect>) return it }
Use in template:
Add these VM options to the run-app
to get class reloading working in
IntelliJ 12
-javaagent:${GRAILS_HOME}/lib/org.springframework/springloaded/jars/springloaded-1.1.5.RELEASE.jar -Xverify:none -noverify -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=profile=grails;cacheDir=/tmp/slcache
Note, that the version (1.1.5) depends on your Grails version (this is for
2.3.7) and the cache location is changed to /tmp/slcache
- the default is
~/.grails/<verison>/.slcache
).
What the title says :)