grails

Using Grails without an user interface

I'm thinking about possible alternatives for our EJB based service layer and wondered if it would make sense to use just the service and database layer of Grails together with the Remoting Plugin or is this using a sledgehammer to crack a nut? Speaking of the Remoting Plugin: is there a standard way of generating a JAR file, that conta...

Grails GSP tab fieldValue formatting

How does the Grails tag fieldValue perform its formatting? I have an domain class with an Double attribute. class Thing { Double numericValue } In GSP, the fieldValue is used (as created by grails generate-all) for rendering: ${fieldValue(bean:thing, field:"numericValue")} Unfortunately digits after 3 decimal places are not di...

Retrieiving domain object instances as a Map

I wonder if there is a way to retreive domain instances as a Map where the key is the id of the domain object. more specific i would like to do myDomainObject.list() to return a Map instead of a List. ...

is it still advisible to use eclipse/intellij for grails development?

one thing I hate about java development are their IDE's, and configuration/setup involved to initially get going. does grails have these issues? from the looks of it, it seems you need a command line open and then any text editor will do. (apart from a mysql and tomcat install). are these assumptions correct or its better to get eclips...

Grails on linux problem: provider for SAXParserFactory can not be found

Running a recently started Grails (1.3.1) application fails on both our linux machines (Bamboo server & laptop) with the exception "Provider for javax.xml.parsers.SAXParserFactory cannot be found". This both using maven or standalone. On our OS X and Windows developments machines using JDK 1.6_020 the problem does not occur. When using ...

Can I grails project have java code in it, or you have to import?

with a grails project, do you put java code inside the same project or do you have to somehow import the java libraries you created from another java project? ...

How to handle new implementation when using AutoWire in spring?

In the grails doc, I read (something along the lines) that the implementation of a server class will bu automatically wired based on the naming convention. If this is true, then how would one go about overriding this behavior down the road say if you have a new implementation? do we have options? like: use @annotations if you don't w...

I have a bunch of data and I need a data filter using Grails

Hello there, I am trying to make a filter for my data so other people can see it, lets say I have a bunch of Events, like a calendar, and I want to see all that have a name or title with the word "Soccer". I've been trying to figure out how to do it but nothing works for me, I also tried to use filterPane plugin but did not work quite a...

grails BIRT plugin deployment problem in linux

Hi, I integrate the BIRT plugin in my application. in the development environment (windows) it works fine. but my deployment is on a Linux server. i getting the application startup error about the engine initialization - i trying to configure the path in a config properties file but it is still not working - do you have the experience i...

[grails + xfire] How to map geo types?

Hi all, I have this class in Grails: import com.vividsolutions.jts.geom.Point class MouseMove { /** map latlon coordinates */ Point geoLocation // other stuff static mapping = { geoLocation type: org.hibernatespatial.GeometryUserType } } When I try to return this class in an xfire service, the SOAP cl...

List domain-class properties in index with Grails & searchable

Hello, i want to list all propertys available to the searchable plugin in a small form. Is there a smart way to list all indexed properties by lucene/compass? Imagine this grails domain-class: class Person { String realname String login static searchable = { realname() } } It would be nice to get a list li...

[grails] JSON converter - stack overflow

Hi all, I'm trying to convert a domain class into JSON. def converter = null try{ converter = events as JSON } catch(e) { log.error "error during conversion to JSON" log.error e } return converter.toString() I always get this error: org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executin...

grails help command is acting strange

Why is this happening when I use the grails help feature? nobody@nobody-desktop:~$ grails help create-app Welcome to Grails 1.3.2 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /home/nobody/Downloads/grails-1.3.2 Base Directory: /home/nobody Resolving dependencies... Dependencies resolved in 2454...

Does grails support sharding?

Does grails support sharding? I want a multi-tenancy database solution and I looking at grails currently. ...

Grails: filter data in a Grails table dynamically

I have a table, with a series of events, name of my class is Entry. Here is a picture of my table is in Spanish, but the basics are the same so it shouldn't be a problem. (the filter HTML code is not yet so its a mess but it works) and here are the results that I get when I look for the entry. Now my problem is that I need the resu...

Lift compared with Grails

Hi, Lift/Scala is getting a lot of attention lately. Having worked with Grails in the past (and finding it quite handy BTW), I'd like to know if there's anyone who has tried both and what's his/her opinion about them. Is one of them better suited for one kind of scenarios whereas the other is better for other kind, or they compete should...

How to define factory methods in Groovy/Grails ?

I buid a factory in groovy, this code works, but I think, this code can be improved (or reduced) : abstract class Processing { abstract getDirName(); abstract getFileType(); abstract moveFile(); abstract processFile(); abstract openFile(); abstract closeFile(); } class ProcessingBuilder { def process...

recursion in groovy (grails)

Hello, I am trying to use recursion in groovy to traverse a tree relationship. The below code runs one cycle, upto childNodes && recurClosure(childNodes ) , but doesn't call the closure recurClosure again. At that instant childNodes had two objects (array list) same type as root. In the code, recurClosure is defined and calls with ...

Is there a grails command to regenerate .project files for Eclipse or STS?

I've checked out an existing Grails project and I want to import it into STS. However, STS refuses to recognize the source tree as a project, presumably because it can't find a .project file. So is there a 'grails' command that will create new .project (and .classpath and .settings/*) for this source tree? ...

grails remote form, multiple submits, with javascript

I have a situation where I have a form with multiple submit buttons and I want to update a remote frame. I've tried using a g:formremote with 2 g:actionsubmit buttons (which support javascript) but the multiple submit buttons have a glitch (described here: http://www.grails.org/Ajax under "Multiple buttons with formRemote"). I took the ...