Essentially I am looking to have a url query parameter persist throughout the life of the grails application (POST or GET). ex.
http://localhost:8080/demo/controller/action/?myParam=foobar
I have tried a couple routes. Dynamic method overriding redirect and customizing application tags for createLink. However, since I also use grails ...
Hello,
How to make the data table rows change color as hover over it. The YUI example is here link text
I tried something like
<script>
GRAILSUI.myDataTable.subscribe("rowMouseoverEvent", GRAILSUI.myDataTable.onEventHighlightRow);
GRAILSUI.myDataTable.subscribe("rowMouseoutEvent", GRAILSUI.myDataTable.onEventUnhighlightRow);...
Hi, I have a Grails 1.2 app secured with acegi that I'm monitoring with the melody plugin for grails. I need to protect the url so only the "admin" role can access it but I'm having trouble with it - the rest of the acegi rules work just fine.
In the BootStrap, I set
def secureReqMap = new Requestmap(url: '/monitoring/**', configAttr...
Hi gurus
How to determine Class type of Object in collection?
class Human{...}
class Man extends Human{...}
class Women extends Human{...}
def humans = Human.findAll()
humans.each(){ human ->
// ??? , it is not work
if ( human instanceof Man ) { println "Man" }
if ( human instanceof Woman ) { println "Woman" }
}
Thanks a...
I know that if you write in a view:
<g:javascript src="myscript.js" />
<g:javascript src="myscript.js" />
<g:javascript src="myscript.js" />
<!-- other try -->
<g:javascript library="myscript" />
<g:javascript library="myscript" />
<g:javascript library="myscript" />
It will out output:
<script type="text/javascript" src="/vip/js/my...
Hello, I'm trying to externalize the QuartzConfig.groovy
I want to be able to set autoStartup to true or false with an external file.
In Config.groovy it is possible to use the grails.config.locations and set properties file that override the properties. Is there something like this in QuartzConfig.groovy ?
Thank you
...
How do I setup logging in a grails unit-test?
When I try log.info or log.debug, the .txt output files are empty, even after I tried adding a console appender. What's going on here?
...
I'm trying to have ImageMagick run from grails to convert some images when I run the command to make an image nothing happens. I get no errors, no information returned nothing at all. I've tried running other commands like touch and ps ux just to see if they work and they all work fine. It just seems like the imagemagick commands are get...
I upgraded my app to grails 1.3.1 (from 1.2.1). everything works fine expect
foo.refresh()
which does fetch new foo from database. it errors with:
util.JDBCExceptionReporter SQL Error: -64, SQLState: 37000
util.JDBCExceptionReporter not allowed in OUTER JOIN condition in statement
I guess this has to do something with fetching, because...
Hi,
I'm trying to create separate controllers for admin in my application. So far I've got something like this :
"/admin/article/$action?/$id?"(controller:"adminArticle")
"/admin/comment/$action?/$id?"(controller:"adminComment")
And so on for all the admin controllers. I would like to make it simpler, tried :
"/admin/$controller?/$a...
Hello,
I'm trying to build an RSS feed using Grails and Rome.
In my controller's rss action, my last command is :
render(text: getFeed("rss_2.0"), contentType:"application/rss+xml", encoding:"ISO-8859-1 ")
However, when I navigate to my feed's URL, the header is :
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://pu...
I have a richEditor (GRAILSUI) and on page load, I want to hide the editor. I want a link to show it. How to do ?
I make this but it's not working :
GRAILSUI.myeditor.hide()
Thanks a lot
...
I have been wondering why when I set the encoding to UTF-8 and rendering the XML it replace the extended characters by escape characters (or character reference) like ’ instead of '?
I'm using the Render method
render(contentType:"text/xml", encoding:"UTF-8") {...}
with a proper header
render(contentType:"text/xml", encoding:...
I wrote a javascript function that uses the innerHtml of a named div (that occurs immediately after the script) for each row as output. the problem is, if I use $('divname'), it always finds the first instance, not the nearest. What's the simplest way in prototype to target the nearest "divname" div?
eg (note, I'm using Grails, hence th...
Grails scaffoldin does not work in my grails application.
When I go from the main page to the specific controller page it output something like this:
Error 500:
Servlet: default
URI: /myapp/myDomain/list
Exception Message: Tag [sortableColumn] is missing required attribute [title] or [titleKey] at /webTestDummyDomain/list:25
Caused by: ...
Hi, I have the following Domain Class:
class Metric {
String name
float value
static belongsTo = [Person,Corporation]
static indexes = {
name()
}
}
How can I add a constraint so Person,Corporation and name are unique ?
Thanks.
...
Hello,
to initialize a javascript loaded grid, I need to pass a list of values from controller/gsp. Since the javascript is activated once the page is rendered/loaded, there may not be a direct way to do it. 2 possibilities
1. do an ajax call, and retrieve the list of values from the server
2. store the list in html as a hidden element...
I have been updating all my services to be transactional by using Grail's ability to rollback when a RuntimeException is thrown in the service. I have, in most cases, doing this:
def domain = new Domain(field: field)
if (!domain.save()) {
throw new RuntimeException()
}
Anyways, I wanted to verify that this indeed will rollback the ...
Here is the lay of the land. I have an app that I have created. I uninstalled hibernate, installed app-engine plugin and am using jdo.
I am able to create a domain-class but the when I run generate-all I run into the following error.
Oh and I did try just generating the controller for the domain class and that seemed to work fine but t...
Basically I have 2 questions regarding grails filters.
According to grails documentation you can do something like below in a filter
if (userId != paramsUserId) {
flash.message = "You can only modify yourself"
redirect(action: 'list')
return false
}
If the above condition is true then how will the return statement get...