I'm coming across references to 'Grails' and 'Groovy' quite often these days.. mostly on how great a productivity booster it is as opposed to standard J2EE, or things like JSF, Struts etc.. And there's also an impressive set of case studies in support of this on their web site too. So I just thought I would explore some of it..
As I st...
Does anyone have code for a Web Service with works with the Quickbooks Web Connector in Grails.
...
Here DealerID can be nullable and CarID, TyreID are unqiue.
The problem I have noticed is:
Grails ignores nulls in unique constraints.
...
Hi, I have a service that contains a map:
static Map cargosMap = ['1':'item1','2':'item 2','3':'item 3']
that is returned via a method in the service:
static Map getCargos() {
[cargosMap]
}
A controller calls it like this:
def mform = {
Map cargos = empService.getCargos()
[cargos:cargos]
}
In the gsp, I have the ...
I am having hard time getting hasErrors to work with indexed properties. For example
class Order {
String prop1
String prop2
static hasMany = [items: Item]
}
class Item {
String name
static constraints = {
name(blank:false)
}
}
Validation works properly and on item.name being blank I do get an error with
<g:renderE...
I'm trying to create the pom for an existing grails project via:
mvn grails:create-pom -DgroupId=ourcompany.com
Now, we have our maven repository available in a local nexus repo:
http://ourcompany.com/nexus
But when i run the above, i get the below error
Downloading: http://ourcompany.com/nexus/content/groups/public/ourcompany/com/h...
Suppose I want to run the following method foo() once every hour in Grails:
class FooController {
public static void foo() {
// stuff that needs to be done once every hour (at *:00)
}
}
What is the easiest/recommended way to set up such cron-like scheduling in Grails?
...
What's the best practice of making a variable that would be accessible by almost all classes in a Grails project? Is there a config file that I can use for storage of that data (i.e. application.properties)?
Thanks.
...
Hi.
Official guide says:
Tomcat deployment is trivial and
requires copying the WAR file into the
TOMCAT_HOME/webapps folder and
restarting the container.
But this is really painful :-(
Does there any way to deploy app without restarting Tomcat ?
...
Hello,
I'm not much familiar to Java Currency type, and how it being used in Grails. Though, I'm yet to use it, I saw a tag <g:currencySelect> to use in the views. So, how do I represent it in the domain class.
class Money {
BigDecimal value
Currency currency
....
}
or is there a better sol, which compares diff money objects, forma...
I read about webflow in Grails, and the purpose is mainlyfor wizard like data gathering which has limited lifetime. The scopes (flow/conversation) are alive till the webflow and persist the data at the end of it. I'm wondering about a similar implementation where data is persisted after certain step. Say creating a call ticket for suppor...
Ant has a -e option for outputting error messages that can be parsed by emacs' compile command. For example, it is possible to do M-x compile, ant -e, then nagivate to any errors with C-x `.
Is it possible to make grails output its compilation errors in this format? Alternatively, is there an emacs variable that can be customized to h...
let's see if I can ask this in an understandable way...
I started with grails and created a domain class called user. As far as I understand, Hibernate is used to map this domain class to the database. This works pretty fine with hsqldb.
Now I tried to switch to javaDB and get an error message because the table is called "user" (which ...
Hi,
Can any one tell me when this error occurs . I suspect this is coming when added any new js in Grails .
I'm unable to dig this :
16 Apr, 2010 4:58:25 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load org.codehaus.groovy.grails.plu...
I'm working through the "Grails in Action" book, and I'm stuck at that part that introduces the grails console. From my project directory, I typed "grails console" to open a console window, and the console even output information indicating it was compiling classes, but when I type this into the console:
new Quote(author:'Larry Wall',co...
I have a dynamic config parameter I want to get like:
String srcProperty = "${attrs ['src']}.audio" + ((attrs['locale'])? "_${attrs['locale']}" : '')
assert srcProperty == "prompt.welcomeMessageOverrideGreeting.audio"
where my config has:
prompt{
welcomeMessageOverrideGreeting {
audio = "/en/someFileName.wav"
...
Suppose I have a gsp snippet stored in my database. How do I programatically merge it with a data model to produce a string.
...
I'm trying to adopt my development from Spring/Maven2/Tomcat -> Grails, and I'm wondering if there's an easy way to manage dependencies in grails separate from maven. Maven does a lot of the magic that grails is doing automatically (unit testing/building/etc.), so I wonder if there's a need for maven at all in grails projects.
So, then,...
Hey folks,
i'm using the jQuery UI datepicker instead of the <g:datePicker>, which is changing the selected date in a textbox. Now I want to save this neatly back into my database, and came across custom property editors. click me hard to see the topic on StackOverflow
However, adding this custom PropertyEditor didn't change anything, ...
Hello,
I have an application that allows multiple users to access 1 xml file. The problem is that when all the users save at once the other changes by other users does not get saved. How do I detect if the file is in user in groovy?
Thanks!
...