I am using grails 1.3.3 and app-engine plugin 0.8.10;
my test case is:
upload.gsp:
<form action="/test/process" method="post" enctype="multipart/form-data">
<input type="file" name="file"/>
<input type="submit"/>
</form>
TestController has:
def process = {
println request.getFile("file").inputStream.text
}
First time...
Coming from a J2EE dev background, I love the idea of Grails....all the benefits of using enterprise Java (Spring, Hibernate, etc. ), but with the simplicity of Rails (scaffolding, convention over configuration, Groovy scripting, etc.). My company is considering rolling out a new enterprise scale web application built on top of Grails. I...
In an application I want to use my own implementation of javax.sql.DataSource that extends the standard org.apache.commons.dbcp.BasicDataSource used by Grails and adds the functionality to set the client identifier based on the currently logged in user at the Grails application.
What is the best way to change the underlying javax.sql.Da...
I am getting the following error when trying to deploy a WAR file (MIPS.war) onto a target environment:
INFO: Deploying web application archive MIPS.war
2010-08-04 12:44:56,977 [main] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'plugi...
Has anyone had any trouble getting Functional Test plugin working in Grails 1.3.3? I've used it in previous projects with no problem, but just tried installing it into my latest project with no luck.
Installation seems to go fine.
Running the script: grails create-functional-test XXXXX results in no test file. Here's the output:
...
We have a grails app that uses two domain names and Tomcat was configured to use Virtual hosts and Aliases. Here's the server.xml snippet:
<Host name="domain1.com" appBase="myApp"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>domain2.com</Alias>
</Host>
We also wanted ...
I realize this has flame potential, please refrain. That being said, I'm interested in what databases people have used with Grails. What positive experiences and what horror stories are out there?
I love MySQL, but there are a few significant bugs that are impacting me between Hibernate and MySQL, particularly as it pertains to index cr...
We have a couple of domains something like the following:
class Interceptor {
static hasMany = [positions:Position]
}
class User {
static hasMany = [positions:Position]
}
There is a procedure in our application where we are looping over a set of Users and we need to see if the User contains a position based on the Interceptor...
For our grails application, I've written a method that lets you upload a CSV file full of contacts, and it will parse the file and create contacts out of the data. I've used a test file of my own (hard-coding which fields mean what) and it works great.
But of course I can't leave the field references hard-coded like that, so my next ste...
I'm trying to implement the advice found in this great blog post for batch processing in grails with MySQL. The problem that I'm having is that inclusion of periodic calls to session.clear() in my loop causes org.hibernate.LazyInitializationException's to be thrown. There's a quote down in the comments section of the page:
You’re sec...
Hi,
Please can you help with the example below:
class Car {
static hasMany = [cd:Cd, fluffyDice:FluffyDice, wheel:Wheel]
}
class Wheel{
static belongsTo = [car:Car]
}
How do I enforce that a car has at least one wheel?
...
I am sending the following AJAX request :
$.ajax({ type: 'POST',
data: $(this).parents('form:first').serialize(), url:'/myapp/comment/saveOrUpdate',
success: function(data,textStatus) {insertNewComment(data)},
error: function(xhr, textStatus, errorThrown) {alert(xhr.responseText);}
})
...and my controller action looks like this ...
I'd like to keep my custom constraint validator closures outside of the constraints definition for my attribute because it makes it easier to read and reuse, but I'm doing something wrong. I'm trying to do this:
class City {
String name
static constraints = {
name( nullable:false, blank:false, validator: uniqueCityValid...
Is this possible to convert in createCriteria()?
SELECT * FROM node WHERE (node.type = 'act' AND nid NOT IN (SELECT nid FROM snbr_act_community)) LIMIT 10
I know there's a 'in' operator and here's what I have so far:
def c = VolunteerOpportunity.createCriteria()
def matchingActs = c.list {
node {
eq('type', 'act')
}
...
Ok, second try here.. hoping I phrase my question better to get a few responses.
I am currently working on a small project developed in Grails with the Spring Security plugin to handle account management and security. I want to intercept the login function and add some custom code. The goal is to have 2 options available to the end ...
Hi,
does anyone know how to handle a "one to many" relationship with Grails/GORM on the google appengine?
I do understand how relationships get handled with Gorm, and there is also a good series of articles about it:
http://blog.springsource.com/2010/06/23/gorm-gotchas-part-1/
http://blog.springsource.com/2010/07/02/gorm-gotchas-part-...
Hello,
Environment
Grails 1.2.2
Ubuntu 9.10
IntelliJ 9.0.3
Everything works fine in IntelliJ. When I execute "grails console" in the project root I get the following
Error executing script Console: groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not...
Do I need to write a custom authentication provider to use facebook connect with account registration + authorization for the Spring Security plugin in Grails? I am trying to offer the traditional application registration with facebook connect in a grails dev app using Spring Security. Does this make sense? Any ideas?
...
We've got an Excel spreadsheet floating around right now (globally) at my company to capture various pieces of information about each countries technology usage. The problem is that it goes out, gets changes, but they're never obvious, and often conflicting - and then we have to smash them together. To me, the workbook is no more than a ...
Hi All,
I am developing a web app in Grails and I need to redirect my current page to another controller, passing to it multiple parameters.
The exact scenario will be to have a from with multiple SELECT menus and have on them all a call to this controller on their "onChange" property, passing to it the current value of all the SELECT ...