Is it possible to compile and sign grails plug-in? I am thinking about distributing my application logic using grails plug-in architecture and I do not want my client to be able to read that easily .groovy or to modify it. Is it possible to package it somehow or at least distribute only compiled .class?
...
Hi,
How can I change the current locale ?
I tried to put controller/action?lang=de but my locale is still en_US
I tried to override the value using this piece of code:
def key = "org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER"
def localeResolver = request.getAttribute(key)
localeResolver.setLocale(request, response...
Is there an easy way for a grails application to find the available list of views (*.gsp) available at runtime.
Ideally a solution will work for both application servers which unpack the WAR and those that do not unpack the WAR.
Thanks!
...
Hi,
Using grails 1.1.1
I got this message when I did a modification on a service and then tried to refresh the page.
I have a controller name ContributionPlanController.
It has a service ContributionPlanservice.
inside the ContributionPlanService, it has ProductService and some other Services including JointPIAService.
JointPIAServi...
Spring WebFlow supports some advanced reuse features like flow inheritance and subflows. Using this features in SWF xml definitions is pretty easy, for example:
<flow parent="parent">
<subflow-state id="addGuest" subflow="createGuest">
Can I use these features with weblflows in Grails?
Can I define these using the SWF groovy dsl?
How ...
Hi,
I'm trying to inject a Map into a Grails controller. I want to inject the same map into many controllers so would like to define it in resources.groovy.
I've looked on the web but can't find an example of creating a simple map.
In Spring MVC I've used something like this:
<util:map id="diplomaPermissions">
<entry>
<key>...
I'm creating a website which requires the images in the site's Gallery to be watermarked. I'd prefer the watermark to get added programatically when the image gets uploaded to the application (via it's web interface) than to manually add it before we do the upload.
Are there any simple ways (perhaps an image library?) that will allow me...
I'm trying to get inputStream from request, but it's always empty. Any idea
how to get the contents of it? I'm trying to make a DataInputStream from it.
...
I have a Grails controller action that is used for Ajax purposes, though you can still navigate and view the page in the browser.
class QuoteController {
def quoteService
/**
* This page uses the ajaxRandom function defined below to display random quotes.
*/
def random = {
def randomQuote = quoteService.getRandomQuote()
[q...
Hi,
This is a design question : when do I need to create/use a static method (in a domain class for instance) and when do I need to create/use a service instead? What is the difference between them ?
Thank you.
...
Simple question :
I have a service class (let's say helpersService) and a method def constructURI(params).
How can I call this method from a template view.
I have tried the following code without success
<% def helpersService = new HelpersService() // or def helpersService
%>
<img src="${helpersService. constructURI(params)}"/>
But ...
I have an application with numerous Controllers. Of those, I have one that I want Update only capability, no Add and Delete functions. I've added the redirects to the class Controller for the Create and Delete, but I want to prevent the Delete and Add buttons from appearing on the different views; list, show, edit. I need full CRUD ca...
I've had an issue between two different Grails plugins (Drools 0.3 and WebTest) where they both seem to include some version of xml-api-* and these seem to not be able to co-exist.
What's the best way to resolve these kinds of problems?
...
Hi,
I am building a new WebSite based on Grails technology.
Concerning the graphical design of my website, I plan to use services from a professional web designer but meanwhile, I need to do some basics graphical design myself in order to have a "user-friendly" beta-version.
I have read through the stackoverflow.com site but couldn't...
Hi!
I have a grails / groovy application running under tomcat.
For some reason I have to be able to change the application context
dynamically. That is, I want to be able (at login time) to set
this context.
I know that this is doable via the Config.groovy but this is static.
At login time I am getting a parameter which is the context...
I do write unit tests while writing APIs and core functionalities. But I want to be the cool fanboy who eats, sleeps and breathes TDD and BDD. What's the best way to get started with TDD/BDD the right way? Any books, resources, frameworks, best practices?
My environment is Java backend with Grails frontend, integrated with several exter...
G'day all,
I've been processing dynamic GSP content via tags in my own taglib which works just fine using code like:
def GroovyPagesTemplateEngine groovyPagesTemplateEngine
...
def processGSPContent(model, name, out) {
log.debug("model is $model")
Template t = groovyPagesTemplateEngine.createTemplate(model.conte...
Hi,
I tried to run the sample application of Nimble 0.2 (blogito) downloaded here : http://github.com/intient/blogito but unfortunately I got stuck with 2 major issues:
When running grails run-app, I got 2 times out of 3 the following error :
2009-10-24 14:38:15,198 [main] ERROR context.ContextLoader - Context initialization faile...
I recently configured Hudson to build a Grails project using Git as the repository. However, I am getting this error when running the build:
Compilation error: srcdir "/home/matthew/.hudson/jobs/qotd-idea/workspace/src/groovy" does not exist
This is because src/groovy is not copied into the Hudson workspace, so Hudson can't find the ...
I am using Grails with the App Engine plugin and JPA persistence. When running
grails test-app
my unit tests run perfectly, but I receive the error below when the integration tests start.
Is this a known issue with the app-engine plugin?
Starting integration tests ...
[copy] Copying 1 file to /home/matthew/.grails/1.1.1/p...