Hi,
I need to add a JNDI datasource from a legacy database to my Grails (1.2.2) application.
So far, the resource is added to my Tomcat (5.5) and DataSource.groovy contains:
development {
dataSource {
jndiName = "jdbc/lrc_legacy_db"
}
}
I also created some domain objects mapping the different tables to comfortably load...
I am trying to recursively list all files that match a particular file type in Groovy. The example at link text
almost does it. However, it does not list the files in the root folder. Is there a way to modify this to list files in the root folder? Or, is there a different way to do it?
TIA
...
I have a controller and a gsp. I go ahead and attempt to build the project but receive issues on my gsp.
It is telling me "The current scope already contains a variable of the name it"
<html>
<head>
<title>Book Collector</title>
<meta name="layout" content="main" />
</head>
<body>
<h1>Book Editor</h1>
<table>
...
I have a table with 252759 tuples. I would like to use DataSet object to make my life easier, however when I try to create a DataSet for my table, after 3 seconds, I get java.lang.OutOfMemory.
I have no experience with Datasets, are there any guidelines how to use DataSet object for big tables?
...
Hey I am learning Grails. I've been playing with it for a while but nothing too serious.
And let's say I have two drop down boxes, one with the type of animal and the second with the breed. How do I give the second box the values??
For example,
If I select dog, it should only show me dog breeds, not the cat ones.
Thanks in advance.
...
I am going to write a groovy script to generate a buttload of constants in a javascript file. ;)
Maybe cross-language metaprogramming? meta-language meta-programming?
To be clear, I am asking what category this falls under
...
Hi there,
I am deploying to a unix box running Jboss. We are using SQL Server 2008 as our database. Once deployed I push the changes by re-deploying the war to the environment.
I see server.log has errors, seems hibernate tries to re-generate/modify tables already created. I am using dbCreate = "update" setting in my datasource.groov...
We are configuring hibernate with grails using the domain classes. Added:
static hasMany = [image:Image]
static fetchMode = [image:"eager"]
However, when I pull the object graph each image is not loaded. Please advise.
Thanks.
...
Hi,
I am rendering two GSP templates in a controller. The first template is rendered as follows:
String couponspage = (g.render(template: "availableCoupons", contentType:"text/html", model : [:]))?.toString()
I include the results of the first template in the model to the call to render the second template as follows:
render(templat...
I want have the following output:
<?xml version="1.0" encoding="UTF-8"?>
<structure:structuralDataRoot xmlns:register="http://www.test.ch/register/1" xmlns:structure="http://test.ch/structure/1" >
<structure:tester>ZH</structure:tester>
<structure:surveyYear>2001</structure:surveyYear>
<structure:surfaceData>
<structure:houseS...
I need to create an online viewer which converts PDF files into browsable images, like http://view.samurajdata.se/. I would like to do this in Grails. Does Grails have any plugins for this?
...
I think this is a newbie question but why it fails on the last assertion?
I was thinking that the closure binds the value on it, so changing it from the closure will change the value outside the closure.
def value = 5
def foo(n){
return {
++n
}
}
def test = foo(value)
assert test() == 6
assert test() == 7
assert value == ...
Firstly, I'm new to groovy as of yesterday, so what I say could be incorrect.
In groovy, every time you create a closure in your code, it creates a separate .class file like this Test$_closure1.class. I could easily have 3000 different closures throughout my project, which would thus push me over the 3000 file limit on App Engine.
It ...
I'm attempting to debug some issues in some (rather bletcherous) Grails code that I inherited. I'm a relative noob in Groovy and Grails although an old Java guy.
Here's the problem: I have this thing running with jconsole and jdb hooks in, but it's tough to use the debugger because so much of the code is in closures. So, for example, ...
assuming the following example:
I have a User class and a Item class and a user can have many items
1) Is there a combined dynamic method to get all the items for a user and also sort them after a Property? I have a controller action that gets the items for a user and send them to the view, and the view will render them all with < g:e...
How would I go about making every method call of every groovy class of mine print "Entering ${methodname}" as it enters the method call?
Without having to wrap every new object I create with new TracingDecorator(new Object())?
...
Hi there,
I noticed that my Grails war has two Groovy jars in it: groovy-1.7-rc-2.jar and groovy-all-1.7.4.jar -- What could be causing this? I took a look at my plugin dependencies, and BuildConfig but didn't find anything...
...
I've got analysis paralysis looking at all the different functional testing options for a new grails (v1.3.4) application. I've looked at
WebDriver/Selenium (which I've used before)
WebTest/Canoo
Geb
Tellurium
Grails Functional Test
and there must be others. I think some of the criteria that I would use to make a decision include (in...
How do I make a Groovy Google App Engine project in Eclipse? I have both the Groovy and the App Engine plugins installed.
I'm already able to successfully make an App Engine or a Groovy project separately, but how do I make a project that is both?
I tried just making an App Engine project and then adding a Groovy class to it, but I ge...
I'm trying to write Junit4 test cases for my Groovy code. The Junit 4 test case works fine inside my Eclipse IDE which is SpringSource Tool Suite. I can't get a test running to run the all of the test cases, however.
Here is my current attempt at a test runner. It's pretty much taken directly from the Groovy website itself:
import g...