I have an external java library I am using in my Grails project. It needs a DataSource via the Spring configuration. However, the dataSource appears to not be accessible from resources.groovy. How do I get access to it? I'm using the following in resources.groovy:
beans = {
eventDao(com.JavaClassRequiringDataSource) {
//dataSourc...
Hi,
I'm looking for a calendar component for my Grails app. I'm aware that Grails already has the g:datePicker, but it's a bit primitive and not very visually appealing.
I've had a look on the contribute-a-tag page and in the grails plugin portals and there's a wide range of options. Rather than trying them all out, I'd be very gratefu...
We are using Grails Acegi plugin 0.5.1 for authentication and also the Captcha functionality. On input validation errors, I would like to generate a new Captcha value. I am using the render method from a User controller to present the template with the validation errors. The template in question includes an img element implementing a ...
I'm trying to create a basic grails domain object and for one of the fields I want to use an array of Strings. However even after running grails generate-views I still don't see the ability to edit said array. Am I going about this wrong?
...
Hi ,
How to implement pagination in grails portlet on Liferay.
The basic pagination was not working on Liferay. When clicked on next the page is jumping from Liferay url to normal url
I used like this :
<g:paginate next="Forward" prev="Back"
maxsteps="10" controller="book"
action="list" total="${Book.count()}" />
t...
Where in the grails files can I define a different context path for a grails app to run on Tomcat ? (For instance, the project is called MyApplication, but I want to reference it as /myapp) Thanks
...
I am using the Eastwood chart plugin (0.5) for Grails (which also requires the google chart plugin). I have a line graph and it's all working brilliantly, but I am struggling to find much information on the plugin and the different things it can do other than what's in the example gsp file.
does anyone know how I can get the area und...
I am creating an invoice management application using Grails, and am experiencing problems with inheritance.
If is my intention that each invoice should contain a collection of lines/items, and that when the invoice is formatted for printing, the items are sorted by date, separated into lists by category, then have the price of each lin...
I had two domains :
class CoverageList {
Integer id
Integer pub_cat_id
Integer brand_id
Integer brand_set_no
String cov_list_desc
Date edit_date
static hasMany = [assoc_cov_lists : AssocCovList]
static belongsTo = [brand : Brand ]
static fetchMode = [assoc_cov_lists:'eager']
static constraints = {
}
static map...
I have partially implemented a solution using an grails filter and a session listener that required me to modify the web.xml. The session listener tells me when the session has ended, and the grails filter tells me when any controller has been called for the first time with an authenticated user.
It appeared to me that both were require...
I'm trying to utilize the termFreqs method provided by the Searchable plugin to generate a keyword cloud for the most popular terms found in an indexed domain class. The problem is, I only want to get the term frequencies for a subset of the records in the database. I have the following classes:
class Text {
String title
String cont...
I have a table which has records that need to be periodically cleared according to a set of criteria.
I was expecting that I could use the criteria builder to just delete the records, but that fails because there is no delete method on criteria...
def c = Agency.createCriteria()
c.delete
{
eq("agency", "XXX")
}
So I thought may...
I have an upload page, if a user goes to that upload page then leaves it for a while and their session times out, then they try to upload they will get redirected to the login page, but after they login it tries to submit the upload again causing an error. How would I avoid the upload being submitted again after login?
...
Is there a way to querying across 2 databases in grails ?
Example (I made a select on two databases - works and test) :
select
c.crf_name,
c.crf_id,
ig.group_id,
ig.group_name,
from
works.crfs c,
test.item_groups ig;
1) I would like to query again...
In controller :
AssocCovList.addAssoc(3, 4)
In Domain :
package com.org.domain
class AssocCovList {
Integer id
Integer association_id
Integer cov_list_id
Date edit_date
static belongsTo = [association : Association, cov_list : CoverageList]
static constraints = {
edit_date(nullable:true )
}
...
I'm working on a project where performance is important and I would like to be able to monitor how my changes affect performance over time.
Has anyone done this with Hudson before?
http://wiki.hudson-ci.org//display/HUDSON/Performance+Plugin
This Hudson plugin mentions something about supporting "JUnit format", but I can't find anythin...
In my grails application, some of my domain classes will never be changed by Users.
However, some maintenance work is sometimes necessary, and administrator should be able to create/edit few instances from time to time (let's say twice a year).
I would like to set a read-only 2nd level cache strategy for these domain classes (static ma...
Hi Guys,
I'm playing aroud with Grails and am finding the ORM stuff tedious because I don't fully understand what I'm doing when it comes to domain classes. I'm hoping someone can put me back on track
Consdier the the following
Test Job One:Many Hardware Used on Job Many:One Physical Hardware
...this is analogous to the cla...
Hi,
I have a service class that calls other utility classes. These classes themselves sometimes
save domain objects and flush them (ex: new User(...).save(flush:true)). I'm calling my service class from a test.
Is my service transactional?
From what I can see in the logs, the Flush Mode is always changing:
impl.SessionImpl setting f...
I'm trying to pass a couple of parameters to a remoteFunction in grails but I'm struggling to format it correctly
I want to pass in the value of a piece of data on the page plus the value of the text box that I have just tabbed out of, so in my onblur I have something along the lines of :
onblur=${remoteFunction(action:'dave', update:...