Hi,
My understanding is that there are two obvious places in a Grails app where one can do meta-programming:
The init closure of Bootstrap.groovy
The doWithDynamicMethods closure of a plugin
The meta-programming I'm referring to here should be visible throughout the metaprogramming, typical examples include adding (or replacing) met...
Since Grails 1.2 there's a documentation engine included: gdoc. The documentation's syntax is based on the Textile format.
Is there some editor support for this? My first choice would be a plugin for IntelliJ, second option on for vim or gedit. Any hints welcome. I am totally a aware that the format is very simple by itself but having ...
One of the things I liked about freemarker is that you can quickly create new macros that encapsulate complex html to make the pages smaller and more concise. Do I have to make tag libraries to do the same thing in grails, or is there a really light-weight syntax for achieving the same thing?
...
Hi,
I have a this model :
class Question{
Set components
static hasMany = [components: QuestionComponent]
}
class QuestionComponent{
static belongsTo = Question
}
class QuestionComponentStatus extends QuestionComponent{
}
class QuestionComponentOther extends QuestionComponent{
}
I want to get only QuestionComponentStatus f...
Is it possible to quickly run single/all integration test in a class quickly in Grails. The test-app comes with heavy baggage of clearing of all compiled files and generating cobertura reports hence even if we run single integration test, the entire code base is compiled,instrumented and the cobertura report is getting generated. For our...
I'm using SpringSource Tool Suite (Eclipse) to program with Grails, and I'm also using JFreechart in the program.
In Grails you log by typing log.info("method worked"). Unfortunately JFrechart has a class called "Log" with Static methods like "info". This means that in STS I type log.info and then when I type space or ( Eclipse "assists...
Hi all,
I'm trying to implement a Consumer/Producer app in Grails, after several unsuccessful attempts at implementing concurrent threads.
Basically I want to store all the events coming from a clients (through separate AJAX calls) in a single queue and then process such a queue in a linear way as soon as new events are added.
This look...
I'd like to use something like the "update=" parameter of a <g:remoteLink> with a <g:actionSubmit>, so that when the submit button is clicked, it will update a specific target. What's the best way to accomplish this?
...
In one of controllers in my Grails application I'm preserving a parameter value in a session variable like this:
session.myVariable = params.myValue
After that, I can access the saved value from different controllers/GSP-pages as long as I actively use the app. However, if I don't use my app for a while, even though my browser win...
Hi,
I tried from a controller to use grailsApplication information to create some folder, however,
what I got from the following line of code is "false" - my grails application runs well, though....
File(grailsApplication.config.images.location.toString()).mkdirs()
could some one help, please?
thanks.
edit: thank you leebutts for...
Hello
I am new to grails and trying to create a form which allows a user to change the email address associated with his/her account for a site I am creating.
It asks for the user for their current password and also for the new email address they want to use.
If the user enters the wrong password or an invalid email address then it sho...
My goal is to take a Grails web application and build it into a Web ARchive (WAR file) using Maven, and the key is that it must populate the "plugins" folder without live access to the internet. An "out of the box" Grails webapp will already have the plugins folder populated with JAR files, but the maven build script should take care of...
Hi, I have a block of gsp I'd like to reuse and make into a little gsp snippet:
<sec:ifLoggedIn>
<g:link controller="user" action="showProfile">My Profile</g:link> |
<g:link controller="privateMessage" action="list">Inbox</g:link> |
<g:link controller="user" action="showPreferences">Preferences</g:link> |
<g:link control...
I have a simple j2ee application using servlets and jsp.Now I want to develop new functionality using grails within the same application not a new application, can I add grails to my existing application ?
...
I want to store the exact country name using g:countrySelect. Example Germany instead of DEU. It is the value in the drop down menu. The drop down text is Germany but when it saves it to the database it changes back to the country code. Sorry if I am somewhat naive but I have been searching for almost 3 hours for solutions and it isn...
I defined an afterLogoutUrl in my SecurityConfig.groovy. This url is to /logout/back; i put a back method in the LogoutController provided by acegi which redirects to the URL of another app (the other app is the "gatekeeper" app in our space). even though I have the rule
/logout/back=IS_AUTHENTICATED_ANONYMOUSLY
in my SecurityConfig...
I have a script to check/uncheck all boxes on a form in a grails application that I am trying to call. I included the function (in <g:javascript> tags) in the head section of the page, and even added an alert before declaring the function to make sure the code block was being processed (it worked), but when I hit my check/uncheck all but...
How do I test this:
render view: "create", model: [user: user]
I know how to test redirectArgs and stuff, but I can't find an example to test something like this. It seems like articles and stuff go out of their way to not test this....
...
I'm new to grails. How do I test a form command object to make sure that it's working? Here's some setup code in a test. When I try to do it, I get the following exceptions:
Error occurred creating command object.
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Error occurred creating command object.
...
I'm developing a Grails web application (mainly as a learning exercise). I have previously written some standard Grails apps, but in this case I wanted to try creating a controller that would intercept all requests (including static html) of the form:
<a href="/testApp/testJsp.jsp">test 1</a>
<a href="/testApp/testGsp.gsp">test 2</a> ...