new Grails plugin: Countries

A common requirement in many applications is to deal with countries and/or continents. The plugin’s goal is to apply the DRY principle to these requirements.

In short, the plugin offers:

  • populated domain classes for countries and continents
  • i18n for continent and country names (for now, only en and de locales). Currently there are 190 countries available.
  • tags for simple usage of
    • localized names for countries and continents
    • select boxes: for all countries, for all continents, for all countries of a continent or for a defined set of countries. The select box contents are automatically sorted by the the localized country/continent name.

resources:

For bug reports please use http://jira.codehaus.org, project “GrailsPlugins”, component “countries”.

Update: since the initial release requires the usage of Grails 1.3.4-SNAPSHOT a bugfix release 0.1.1 has been release shortly afterwards. 0.1.1 should work with Grails >= 1.0.

4 thoughts on “new Grails plugin: Countries

  1. David Brown

    Hello Stefan, I have the countries 0.3 plugin working AFAIK. I am not getting any exceptions but the results are somewhat buggy:
    * GrailsUnitTestCase such as the following seem to show all is copacetic:
    assertEquals ‘United States of America’, animalMaster.country.getKey()
    * I have Grails standard CRUD: list, add, edit, show working with countries 0.3. On the list.gsp page the country column is empty if populated via Bootstrap.groovy. And, this is verified by the mysql table column: country_id displays NULL.
    * If I edit a record from the list.gsp and update the country column by selecting a country from the countries 0.3 pull-down the following is displayed in the country column:
    grails.plugins.countries.Country : 241
    * The value displayed above: 241 is persisted in the MySQL column: country_id.

    I can create an issue for this in Jira unless you have a solution.

    :-David.

  2. Stefan Armbruster Post author

    Hi David,
    are you using scaffolding for CRUD? If so, the behaviour is obvious since the plugin currently does not change the standard scaffolding.
    Regards, Stefan

Leave a Reply

Your email address will not be published. Required fields are marked *