We are happy to announce that our NestedSet plugin for the Grails framework has been released. The plugin creates a hierarchical structure on top of plain database records. A description of the “nested set” data structure can be found in Wikipedia. The NestedSet Grails plugin is non-intrusive – it does not change your data model,… Continue reading Nested set plugin for Grails
Tag: Grails
Playing with Grails application configuration
This small tutorial will show how to create a configuration file and how to manage configuration of your Grails application. It will show how to Access configuration parameters Create external configuration Configure Spring for different environments Create a new environment Accessing configuration parameters The configuration of Grails is stored in grails-app/conf directory. Parameters are stored… Continue reading Playing with Grails application configuration
Configuration and usage of Gldapo in a Grails project
Configuration and usage of Gldapo in a Grails project Gldapo is a groovy library for object oriented LDAP access. “The Gldapo is to LDAP what GORM is to SQL”. Gldapo is packaged in Grails LDAP plugin, its installation is easy. In the root of your Grails project run command: grails install-plugin ldap Configuration The Gldapo… Continue reading Configuration and usage of Gldapo in a Grails project
Grails RichUI – Incorrect international characters of the month names
I am working on a small project and I decided to use RichUI plugin do display a timeline. The plugin is just great and working like a charm. If you want to try it, this tutorial is a very good one. The english version works perfectly, but I have found a small bug in the… Continue reading Grails RichUI – Incorrect international characters of the month names
String similarity detection
I was looking for a simple string similarity detection algorithm and I did find the one on CatalySoft. Since I like it and I found it useful, I did create a groovy equivalent of it. Here is the code: public class LetterPairSimilarity { /** @return an array of adjacent letter pairs contained in the input… Continue reading String similarity detection
Modalbox in Grails
There is a nice and handy javascript library for creating kind of a modal “window”, similar to the famous lightbox. Here are few lines of code to make it running in a Grails application Installation First of all, you have to download the library. The easiest way is to install a plugin modalbox grails install-plugin… Continue reading Modalbox in Grails
Grails: internationalization in the service
Today I spent some time by creation of localized messages in a service. Here is a small tutorial. 1. Create your service grails create-service Local 2. Add a messageSource variable to your new service class LocalService { def messageSource } 3. Use it in a service method // Initialize parameters Object[] testArgs = {} def… Continue reading Grails: internationalization in the service
Bootstrapping Grails integration tests
It is quite easy to prepare test environment the same as the development one. Just use Bootstrap. class BootstrappedTests extends GroovyTestCase { void testBootstrap() { new BootStrap().init(null) assert MyDomain.count() == 5 // Perform your tests here } }
Custom iterative tag in Grails with named variable
I will show you how to create an iterative Grails tag that can contain another tag. The inner tag will use variable of the iterative tag. So, we are going to implement a tag that creates n links ‘/show/1’, ‘/show/2’, etc. with description ‘Article number 1’, ‘Article number 2’ etc.: First of all, there is… Continue reading Custom iterative tag in Grails with named variable
From Mysql to Oracle: Grails application migration
Today I have finished migration of our Grails prototype. Originally we did develop it for MySQL, but the final system have to work with Oracle. This post summarize troubles and differences I was facing. User creation Since I am not Oracle administrator, it took me some time to put together script that creates user and… Continue reading From Mysql to Oracle: Grails application migration