Hi,
In the messages.properties file in a Grails application I've seen examples of validation messages such as:
User.password.size=Size of bar must be between {0} and {1}
which applies to
class User {
String password
static constraints = {
password(size:5..15)
}
}
This example assumes that {0} is bound to the m...
Hi, we are programming in Grails and as part our system requirement we need to have the option to convert a RTF document to PDF. We found a service in OpenOffice that does the job, but would like to have something that doesn't depend on other application's services. Any ideas? Thanks.
...
I am attempting to create a Java source file which will interface with my Grails application. When a certain action is performed, I want this Java file to execute a program via commandline. I am attempting to do this via the Runtime.getRuntime().exec() command, however I keep getting an error about the Runtime object being undefined. ...
We are looking to improve our QA process. Can we rely only on Eclipse plugins or should we consider other "external" tools? I would be interested in QA tools for Java / Grails using Eclipse IDE.
...
Hy,
I'm wondering what's the best way to create an Admin (backend) section in a Grails app ?
I want to create an Admin folder in the Controllers folder of Grail to put all my admin controllers. But Then will I have to create manually the URL mapping for each Admin controllers ?
I have already generate all my frontend gsp with the ge...
I'm brand new to acegi and relatively new to Grails.
I just followed the tutorial to set up a new role and a new user. Every time I saved the user (with a role checked), it saved the user information fine, but not the role associated with the user.
I finally dug into the controller code that was generated, and noticed this:
private ...
The answer to this may be obvious but how do you save an object, in grails, that has a composite id. I have an object that has a composite id including a long and a date and I am trying to save an instance of the object from the update method of another classes controller, and using (object).save() isn't working. Any tips or suggestion...
I am searching for an Tool to test an Grails Wep Application on a Tomcat Server.
I need some Data about the Performance when 30 Users work with my app.(Creating/Editing/Deleting Entries on my Database (Firebird).
...
I enjoy Git support in Intellij IDEA 8.1.3. I've been doing some Grails Development on Linux with it.
IDEA seems to be ignoring other files from .gitignore like /tests/reports, etc. but is not ignoring stacktrace.log. In other words changes to stacktrace.log show up in the 'changes' window
The contents of my .gitignore file is:
*.i...
Hi,
I am using grails 1.1.1 and i got this error
collection [Person.companies] was not processed by flush()
the configuration is as follow:
Person domain has many companies (Company domain)
while Company belongsTo Person
then in the controller I did like this
def person = session.person ;
def jobs = Job.findByPerson(person);
job...
Hi,
I would like to know if for example, I have about 80 domains on my projects, does it means that the 80 domains will be loaded into memory when I run the project or it will be loaded when I need that domain ...
It seems if I have many domains in one project, I have to disable auto compile and increase the perm gen space.
is there ...
hi,
I have this log4j configuration in my grails config.groovy
log4j = {
error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages' // GSP
warn 'org.mortbay.log'
appenders {
rollingFile name:'infoLog', file:'info.log', threshold: org.apache.log4j....
Anyone knows how to fix this ?
It works fine on my env (Me being the developer) and doesn't work on my colleagues machine who unzips the whole
Welcome to Grails null - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: C:\abc\products\grails-1.1
Base Directory: C:\abc\products\foo\bar
Running script C...
Hopefully this will be an easy one to answer. I created a class in Grails called player which has this information:
class Player {
String steamId
String name
String portrait
static hasMany = {playerStatistics:PlayerStatistics}
static hasOne = {playerForumProfile:PlayerForumProfile}
}
For clarification, a Player object can have o...
I recently upgraded to grails 1.1.1 and while my application works fine, my tests are having some serious issues:
for unit tests some mocks are failing, it seems like anything that calls a method from a domain class isn't working, for instance
def boolean isParameterized() {
return (parameters != null && !parameters.isEmpty())
}
i...
I have the following identical code-block in all my controllers' beforeInterceptor blocks:
def beforeInterceptor = {
request.someField = Foo.someFoo(request)
if (!request.someField) {
redirect(...)
return
}
}
Repeating the exact same code fragment in all controllers violates DRY. Is there some standard Grails way to defi...
Hi,
I have domain that has more than one unique fields like the following
class Shoes{
String name;
Brand brand ;
Color color ;
Supplier supplier ;
Integer size ;
BigDecimal price;
}
name, brand, color and supplier need to be unique ... so if there are product with same name brand color and supplier it would retu...
I want to run a periodic task within a Grails application. Can anyone recommend a best practice for doing this?
...
With Book and Author domain classes as follows:
class Book {
static belongsTo = Author
static hasMany = [authors:Author]
String title
}
class Author {
static hasMany = [books:Book]
String name
}
How would I find the book by an author that has the title "Grails"?
I tried this but it didn't work (No signature of met...
Hi,
In my Grails app, I want to prevent the Searchable plugin from loading when running my unit tests. I tried doing this using the following code in the Bootstrap class
def grailsApplication
def init = {servletContext ->
def currentEnv = grails.util.Environment.current.name
if (currentEnv == 'test') {
def doNothing ...