Hi, this is actually connected to an earlier question of mine here.
Anyway, I have 3 domains that look like this:
class A {
...
static hasMany = [ b : B ]
...
}
class B {
...
static belongsTo = [ a : A ]
static hasMany = [ c : C ]
...
}
class C {
...
static belongsTo = [ b : B ]
...
}
In my GSP page, I call an a...
I am trying to write some selenium inside my scenario's. However, when I try to start Selenium using the following code:
before "start selenium", {
given "selenium is up and running", {
selenium = new DefaultSelenium("localhost",
4444, "*firefox", "http://www.google.com.my/")
selenium.start()
}
I get an error:
Error running easyb t...
I would like to use new table component added to JasperReports 3.7.2 with grails jasper plugins. I find this new component useful to generate tables.
I have define Table dataset 1, and some fields (ex : $F{name}), problem, all my fields values are null. I have also define fields (not attached with table), and I get values.
Here is my t...
i'm trying to create some domain objects from xml.
class A {
String name
}
class B {
A a
int something
}
i first created an instance of A,and flushed. when creating B, first map the available attributes.
def b = new B(xml.attributes())
this would map 'something' correctly, but not the object type A. So, I retrieve the instan...
Hi,
I'm half way through writing my first grails app. It's going really well so far but I've only just realised that when I go live I won't be able to change the domain model around so much.
The application is backed by a MySql database, I currently only have one object of interest 'Person'. If after deployment I want to add a 'Group' ...
I'm looking to put navigation in my GSP template, and I would like to set the active class on the navigation elements for each respective page. What's the best way to do this? I have several .gsp views merging with a single template that looks like this:
<div id="bd" role="main">
<div role="navigation" class="yui-g">
<ul id=...
I do not know what changed in my environment, but all of a sudden I can not pull any plugins from the default repository. I went through the _*.groovy scripts and nothing has changed in my grails home directory and it appears that the default repository url is set correctly (DEFAULT_PLUGIN_DIST = "http://plugins.grails.org").
I am as...
Grails offers the ability to automatically create and bind domain objects to a hasMany List, as described in the grails user guide.
So, for example, if my domain object "Author" has a List of many "Book" objects, I could create and bind these using the following markup (from the user guide):
<g:textField name="books[0].title" value="...
I would like to use subreports with grails jasper plugins, I followed the manual at this url (http://www.grails.org/plugin/jasper). Here is my code :
Domain Book :
class Book {
static belongsTo = Library
Library library
String title
String author
String publisher
String category
static constraints={
...
Hello,
I am looking for a solution that allows me to deploy multiple load balanced Grails instances that have shared cache (EhCache Server ?) and sessions, is this possible ?
I can't find any documentation on this (connecting to a common EhCache server or using Distributed EhCache, and sharing sessions (using EhCache too ?))...
I'm lo...
Hi, is there a way to use Grails in "exploded" mode on tomcat in order to make individual changes in a running application (like a gif) without having to regenerate the entire war and upload it ?
Something like adding an xml file in tomcat's conf/Catalina/localhost that points to an exploded grails application ?
Thanks in advance.
...
Hello,
is there a way to debug the scaffolding template (generated in /src/template/scaffolding). Not to debug the view gsp files, but the template itself. I guess I could put some comments.. other than that..
thanks...
Babu
...
Hello,
I'm working on an internal IT application monitoring outages for a network with a national footprint in the US. I'm considering overlaying outages by region on a map. Showing outage areas in red for example. The user clicks on the outage area displaying drill down information. The technology stack includes Grails/JBoss/Linux. Are...
To improve stemming we want to switch from the default analyzer to snowball, however, having a lot of difficulty with the proper settings and would appreciate any help. In
Environment:
- Sun's Java 1.6.16
- Grails 1.2.2
- Searchable Plug-In 0.5.5
Config.groovy:
Have tried both settings:
compassSettings = ['compass.engine.analyze...
I want to write an insert query in Grails. I have tried all possible combinations but cant get the syntax correct. Can anybody please help?
class Person {
int age
String name
}
i tried the following:
Person.executeUpdate("insert into Person values (20,"ABC")")
p.s.:Please do not mention using save()
...
On a form I have two submit buttons:
<g:submitButton name="add" value="Add"/>
<g:submitButton name="addAnother" value="Add and Create Another"/>
I need to take slightly different action based on which button was used to submit the form. How to I get the name of the clicked button in my controller?
...
Hi Guys
I have a small grails application running on Tomcat in Ubuntu on a VPS. I use MySql as my datastore and everything works fine unless I leave the application for more than half a day (8 hours?). I did some searching and apparently this is the default wait_timeout in mysql.cnf so after 8 hours the connection will die but Tomcat wo...
Hello,
I am trying to make a taglib to represent an object (to read and display at the UI). When creating an object (save method in the controller), I see the domain class and association are created by the auto assignment of parameter
def Book = new Book(params)
It also maps complex types (for eg: joda time). I wonder about the ...
Hello fellow Grails Developers!
I was wondering if you could help me with what must be a very common issue. I have come from a world of Java and eclipse where JavaDocs and APIs are at your fingertips. Grails has some great features and plugins but I find their inner workings completely undescoverable and that makes me sad.
Take for exa...
The UIPerfomance plugin is an easy way to speed up your web pages by applying some of the best practices rules from Yahoo performance team (like minifying, setting a far-future expires header, versioned images...)
Unfortunately I didn't find a way to store the static resources in a location outside of the webapplication which has his o...