grails

Slightly embarrassing grails question

I'm hoping this just needs a new pair of eyes casting over it. I have a school class class School { String name static constraints = { name(maxLength:50,blank:false) } static hasMany = [pupils:Reviewer] String toString() { return name } } I have a School controller class SchoolController { ...

Configuration of Grails plugin

I'm developing my first Grails plugin. It has to access a webservice. The Plugin will obviously need the webservice url. What is the best way to configure this without hardcoding it into the Groovy classes? It would be nice with different config for different environments. ...

why aren't more people using Grails?

Hi, I've been learning Groovy & Grails recently, and in terms of developer productivity it seems to be light years ahead of other Java solutions (Spring, Struts, EJB, JSF). If I search monster.ca, for either Groovy or Grails, 0 matches are returned, which suggest Grails isn't doing too well in terms of adoption. I realise that: Grail...

What are best practices for handling WsiWyg text from an editor such as the YUI Rich text editor?

I'm looking for any experience someone can share regarding the usage of a rich text editor such as YUI's rich text editor. In particular I'm interested in how to deal with or prevent issues with Cross site scripting Image or attachment handling Any similar questions you can provide links to or web articles would be appreciated. ...

Merge Spring and Grails projects

We are developing an backoffice application using Spring and Maven as configuration manager. The project is moreless divided in two parts, and one of this parts is just for manage the data in the DB tables. Now someone has discovered Grails, and with Grails this job is very easy, but we can't drop all the job and start a new project (th...

Is developer productivity higher on Ruby on Rails or Grails?

Given that both Ruby on Rails (RoR) and Grails can run on the JVM (Java Virtual Machine), which language and framework enables equally competent and experienced developers to be more productive and roughly by what percentage? (i.e., deliver more business functionaity for the same amount of effort) I know that Grails is easier for a Java...

i have to devlop a web-app using grails + workflow + java what is best way to integrate them ? is there a tutorial ?

i have to devlop a web-app using grails + workflow + java what is best way to integrate them ? is there a tutorial ? ...

UTF-8 only in Grails 1.1 database tables

When using Grails 1.1 together with a MySQL the charsets of the auto-generated database tables seem to default to ISO-8859-1. I'd rather have everything stored as pure UTF-8. Is that possible? From the auto-generated database definitions: ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; Note the "latin1" part. A work-around th...

Grails Security Problem and Search Engine optimization

I'm trying to build a control logic that depends on the current gsp page to call an action, is there a tag or a session method that i can use to identify the current gsp page I want to restrict access to all GSPs except singup and login, so if a user open any other gsp he will be redirected to signup page and he will also be able to n...

Can't get Grails 1.1 to work with Maven 2.1

When I try to build a Grails 1.1 project with Maven 2.0.9 or 2.1, I get this error: [INFO] [grails:maven-compile {execution: default}] Running pre-compiled script Environment set to development Plugin [debug-1.0.2] not installed, resolving.. Reading remote plugin list ... Plugin list file corrupt, retrieving again.. [delete] Deleting...

Integrating grails into an existing spring application?

What if you don't want to start a separate project for grails but instead sneak it into an existing webapp? I have to build an admin interface/crud for some new entities and thought it would be a perfect way to learn grails. ...

Security Reinforcement: How to collect visitors' IP addresses in Grails Framework?

How to make a logging list of Users' IP addresses, should this be done via tomcat or grails or a combination of both ...

Best IDE for Grails 1.1.X development

Hi, I've been on a frustrating quest to find an IDE which provides reasonable support for Grails 1.1 development. My minimum requirements are: Supports running tests within the IDE Supports debugging within the IDE while running either the tests or the app itself Provides code-completion, including dynamic finders added to domain clas...

What are the Grails advantages over other Java Web Frameworks?

I've worked with JSF, Spring MVC and Struts and I think I got a good level on these frameworks. Recently I heard that many good developers I worked with are learning Grails and using it in their projects. What are the practical advantages of Grails over other frameworks? Is worth to learn it besides I know other frameworks? What is all ...

Grails GORM MissingMethodException with 1:N relationship

Hi guys, I have such domain classes: class ServicesGroup { Long id String name String description String toString(){ return name } static mapping = { version false table 'root.services_groups' id column:'group_id' name column:'group_name' description column:'gr...

Setup Grails 1.1 app with plugin dependencies in IntelliJ

Hi, I'm using IntelliJ 8.1.2 on Windows to develop a Grails 1.1 project that depends on internally developed plugins which are not available in the central Grails plugin repo. In Grails 1.1 the default location of installed plugins was moved from $PROJECT_ROOT/plugins to $HOME/.grails/1.1/$PROJECT/plugins Using the command-line, I've i...

Load application class from plugin

Hi, In a Grails 1.1 plugin, I'm trying to load a class from the main application using the following code: class MyClass { static Map getCustomConfig(String configName){ return new ConfigSlurper(). parse(ApplicationHolder.application.classLoader.loadClass(configName)) } } Where configName is the name of the c...

File attachments broken upgrading to grails 1.1.1 from grails 1.1-beta3

This is a rather specific upgrade path, but it's what I'm on. I think I tried going to 1.1 as well, and had the same problem, but not 100% sure. Anyway, I'm on 1.1-beta3 and have implemented a file upload/attachment system as outlined herer: thegioraproject.com/2008/03/26/image-attachments-in-grails-using-imagemagick/ I've got a 'brok...

What is "coding by convention"?

I've been looking at Groovy on Grails and noticed a line at the bottom that says: Grails aims to bring the "coding by convention" paradigm to Groovy. What exactly is coding by convention? ...

many-to-many not persisting in gorm/grails app

I have roughly the following in my grails 1.1 app class AppCategory { static belongsTo = App static hasMany = [ apps: App ] String name } class App { static hasMany = [ categories: AppCategory] String name } App app = new App() AppCategory appCat = AppCategory.findByName('blah') app.addToCategories(appCat) app.sa...