admin
This user hasn't shared any biographical information
Posts by admin
Grails Goodness: Customize the URL Format
Dec 27th
Starting from Grails 2.0 we can change the URL format in our application. Default a camel case convention is used for the URLs. For example a controller SampleAppController with an action showSamplePage results in the following URL /sampleApp/showSamplePage.
Alfresco 4 and Web Quick Start Page Not Found Errors
Dec 16th
After installing Alfresco 4.0.b with the Web Quick Start module and setting up the demo site following the instructions I got “Page not found” errors. With the Alfresco 3.x release I never experienced these problems. It turns out to be a problem with the new Solr search engine that is used. The workaround for now is to revert back to the Lucene search mechanism. The Alfresco forum has a topic with a description of the workaround.
Some Groovy Love :-)
Dec 11th
Our 2 year old son plays with his Lego Duplo Cars set and already experiences some Groovy love.
Grails Goodness: Get GrailsApplication and ApplicationContext in GSP
Nov 28th
Several variables are injected to Groovy Server Pages (GSP) in a Grails application. Two of them are the ApplicationContext and GrailsApplication objects. They are bound to the variables applicationContext and grailsApplication.
Grails Goodness: Access Action and Controller Name in GSP
Nov 25th
In our GSP views we can see the name of the action and controller that resulted in the view. We can use this for example to show or hide certain information based on the values for the action and controller name. Grails injects the variables actionName and controllerName automatically and sets the values based on the action and controller.
Groovy Goodness: Magic Package to Add Custom MetaClass
Nov 23rd
Groovy is very dynamic. We can add methods to classes at runtime that don’t exist at compile time. We can add our own custom MetaClass at startup time of our application if we follow the magic package naming convention. The naming convention is groovy.runtime.metaclass.[package].[class]MetaClass. For example if we want to change the behavior of the java.lang.String class, then we must write a custom MetaClass with the package name groovy.runtime.metaclass.java.lang and class name StringMetaClass. We can do the same for classes we create ourselves. For example if we have a class myapp.RunApp than the custom metaclass implementation RunAppMetaClass would be in package groovy.runtime.metaclass.myapp.
Groovy Goodness: Create Simple Builders with Closures
Nov 17th
In Groovy we can use pre-defined builders like the JsonBuilder or MarkupBuilder to create data or text structures. It is very easy to create our own builder simply with closures. A node in the builder is simply a method and we can use a closure as the argument of the method to create a new level in the builder hierarchy.
Groovy Goodness: Create Our Own Script Class
Nov 17th
Groovy is a great language to write DSL implementations. The Groovy syntax allows for example to leave out parenthesis or semi colons, which results in better readable DSL (which is actually Groovy code).
Groovy Goodness: Create Our Own Script Class
Nov 17th
Groovy is a great language to write DSL implementations. The Groovy syntax allows for example to leave out parenthesis or semi colons, which results in better readable DSL (which is actually Groovy code).