grails

Grails: How to pass arrays to GSP pages

I need to display list of directories in GSP pages. Can you please guide me how to pass this array to GSP. Here is my below sample code. File dir = new File(petl_dir_path) def list= [] dir.eachDir{ list << it.name } Please guide Thanks ...

Keeping track of variable across multiple requests in Grails

For a webapp written in Grails I would like to keep track of the current users account. In addition the account-name should be displayed as part of the url. 1) Keep the variable in the session 2) Pass the variable via account parameters Currently I am experimenting with option 2 which allows me to create URL's like http://app.com/acc...

Grails & Navigation Plugin: Rendering SubItems from different controllers?

Hello, I'm using Grails 1.1 and the navigation plugin 1.0.4 and just bumped into a problem. I want to have actions from 3 different controllers contribute as subitems to a menu from a different controller. All examples I saw use the basic case of main menu and subitems directing to actions inside same controller. I have tried to use a...

Grails Acegi Plugin springsecurity.GrailsDaoImpl - User [admin] has no GrantedAuthority

Hi guys, i upgraded my grails 1.0.4 + acegi 0.4.1 project to grails 1.1 with acegi 0.5.1. I'm able to start my application without errors, but when i want to login i get a "wrong username or password" message. Grails-shell output is: 2009-04-26 12:38:46,997 [403984690@qtp0-0] ERROR springsecurity.GrailsDaoImpl - User [admin] ...

Class cast exception in Groovy

I want to upload an image using a groovy on grails. My gsp page is as follows (I am showing a simplified version of the original) <g:form controller="post" action="save" enctype="multipart/form-data"> My picture <input type="file" name="myPicture" /> <g:submitButton name="submit" value="Save"/> </g:form> My dom...

Composite foreign key columns in GORM

Hi, I need to customize the column names for composite foreign keys in GORM, and I didn't find any document that shows how to do it. I know how to customize PK columns, and how to customize a single-column FK, but not multi-column FK. Is it possible at all? Thanks. ...

Help-balloons in groovy on grails

Hi! I am using the help-balloons plugin I would like to use it parametrized. I mean, the messages should come from a properties file. In the documentation appears the following: <g:helpBalloon code="user.name" suffix=".help"/> In this last example, the code attribute is used to look up the balloon's title within the message bundle an...

How to implement ajax voting application using the Grails Framework?

any good samples of code or articles that can help? ...

How to integrate google's Step2 with acegi security in the Grails Framework?

How to integrate google's Step2 with acegi security ...

How to implement openID using openid4java in GSP

How to build openID ReturnURL in gsp?? Define a ReturnURL This is the endpoint where your webapp will receive and process the authentication responses from the OpenID Provider. String _returnURL = "http://example.com/openid"; Reference:http://code.google.com/p/openid4java/wiki/QuickStart ...

Using java classes in Grails

I have a Java\Spring\Hibernate application - complete with domain classes which are basically Hibernate POJOs There is a piece of functionality that I think can be written well in Grails. I wish to reuse the domain classes that I have created in the main Java app What is the best way to do so ? Should I write new domain classes exten...

Grails dynamic scaffold with hasMany: is it a bug or am I misconfiguring?

Howdy, I'm a Grails noob and running into something that seems to be a bug, but it is entirely possible I'm not configuring everything correctly. I've got two simple Domain Classes: class Player { String firstName String lastName static constraints = { firstName(blank:false) lastNam...

Modeling many-to-many relationship in Grail on top of a legacy database

Hi I have a simple ticket logging application build on LAMP. I am currently playing around with grails. I want to build a demo app that uses the existing MySql database without changing the database too much. There is a many-to-many relationship in the database: 'client' table is mapped to the 'user' table through the 'cliet_contact' ...

Grails query association problem

Hi, I'm having trouble writing a query for the following domain classes: class Person { static hasMany = [memberships: Membership] } class Membership { static belongsTo = [person: Person, group: Group] Date joinDate = new Date(); Group group; Person person; } class Group { static hasMany = [memberships: Member...

Grails Duplicate Error Messages

Hi, I'm new to grails and I have a problem: I have this snippet of GSP: <g:form url="[controller:'main',action:'login']"> <label for="name">Usuario:</label><br/> <input type="text" name="name" /><br/> <label for="pass">Password:</label><br/> <input type="password" name="password"/><br/> <input type="submit" value="Logi...

First record in table overlapped by header of table in IE.

Created a table which works fine in IE6,7 but in FF the header hides the first datarow. <g:if test="${params.history!=null}"> <div style="width:791px;padding-bottom:10px;overflow-y:auto;${(lstDNCallEntries.size()>0)?'height:100px':''}"> <table class="table"> <thead style="position: absolute;"> <% params=params.findAll{ k,v -> k != 'sor...

How to rename an existing Grails application

Hi there, Does anybody know how to (easily) "rename" an existing grails application? I'm running into this because my PaaS provider does not allow me to delete a subscription... So I want to deploy my application under a different name. Of course, I can do this manually, but I think it might be a useful 'top-level' script (i.e. "grails...

Is there a standard way of audit tracking in grails?

Is there a grails plugin or standard way of managing the created_by, created_on, updated_by, updated_on fields for a domain object? ...

How to place certain files in the root directory of the Grails server?

I am using a grails application as backend for a Flex frontend. To be able to easily develop and debug my applications I would need to place a crossdomain.xml file into the root of the server, i.e. it must be accessible via http://localhost:8080/crossdomain.xml. Similar use cases might be the deployment of a favicon.ico or a robots.txt, ...

switching from Eclipse to IntelliJ for Groovy/Grails dev

Hi, I'll be switching from Eclipse to IntelliJ, as I'll be doing some Grails dev soon (and the Groovy/Grails plugins for Eclipse suck). I've been using IntelliJ for a few hours and can't really figure out how to use it effectively. Is there some kind of an Eclipse mode, which makes it behave similarly to Eclipse, or some kind of a tuto...