Hi,
I've installed the plugin from this article by Peter
http://www.cacoethes.co.uk/blog/groovyandgrails/the-command-pattern-w....
While compile time its not able to find the module file which is
present in the plugin. Since there are no jar files for the module,
can you tell me what I'm missing here..
The stack trace is as follows:
...
The IntelliJ Groovy/Grails support in IntelliJ IDEA 8.1 is great.
However, I've recently upgraded to the new and recently open-sourced IntelliJ IDEA Community Edition 9.0 BETA. Since updating to the new version the Grails support seems to have disappeared. I'm no longer able to choose the option "Grails application" when creating a new...
I am new to gwt. I am trying to integrate gwt+grails.Can anybody provide me a good example for handling the request using grails controllers and not a custom servlet.I will be really thankful if anybody can guide me :)
...
I'm trying to use 'bindData' method and exclude one field like so:
bindData(person, params, [exclude: ['responseItems']]);
I thought that by listing the 'exclude' parameter, when bindData iterates over 'params', it would ignore the key-value pair specified in the array but it doesn't appear so.
Instead, I'm getting an error:
org....
Is there a way to configure Grails 1.1.1 or Grails 1.2 M4 to map a multi-word controller or action written in PascalCase or camelCase to automatically map to a URI with hyphens separating the words?
For example, if I have a controller named MoreInformation with a function named boardOfDirectors, I would like the URI to resemble:
http:/...
Hi,
I've repeatedly had problems with the DSL introduced by Grails in version 1.1 for configuring Log4J. My current configuration looks like this:
log4j = {
debug 'com.mypackages'
appenders {
console name: 'stdout', layout: pattern(conversionPattern: '%d{dd-MM-yyyy HH:mm:ss,SSS} %5p %c{1} - %m%n')
rolli...
I am trying to develop a grails application that has "root" content (www.mydomain.com/about for example) but will also support "projects" based upon the subdomain of the request; for example myproject.mydomain.com > www.mydomain.com/myproject. As a first pass, i have the URL configuration below:
"/$controller/$action?/$id?" {
...
}
"...
class MyController {
def myAction = {
throw new MyException("Test")
}
}
Is it possible to catch / handle the exception thrown by the code above? The following url-mapping kinda works, but it causes the exception to be logged, which is annoying because in my case I'm able to handle it.
"500"(controller: "error", action: 'm...
I'm new to Grails/Groovy and am trying to find a node in a an xml file; I've figured out how to iterate over all of them, but I want to exit the loop when the target node is found. I've read that instead of using "each", use "find", but the find examples I've seen are conditions. Right now the logic I have is going to iterate through the...
I'm trying to expose a webservice via grails & cxf grails plugin.
this is the skeleton of the webservice:
class IssueService {
static expose=['cxf']
def List issueList(){
def list = Issue.list()
return list
}
def Issue singleIssue(id){
def currentIssue = Issue.findById(id)
return currentIssue
...
Hi,
My Grails application has a large number of enums that look like this:
public enum Rating {
BEST("be"), GOOD("go"), AVERAGE("av"), BAD("ba"), WORST("wo")
final String id
private RateType(String id) {
this.id = id
}
static public RateType getEnumFromId(String value) {
values().find {it.id == val...
With tags, you can do this in a gsp:
<g:if test="${someBean?.aCondition}">
<div class="aSection">
...
</div>
</g:if>
What I really want to do is add a second 'class' that either contains the 'display:none' or 'display:block' attributes based the value of '${someBean?.aCondition}'.
The final html would like this:
<div class="aS...
I'm trying to use g.render in a grails service, but it appears that g is not provided to services by default. Is there a way to get the templating engine to render a view in the service? I may be going about this the wrong way. What I'm looking to to is render the view from a partial template to a string, and send the resulting string...
Hi,
I'm currently in the process of building a CRUD tool for an existing Spring-based application.
The application is being included in the Grails app as a JAR library which seems to work fine.
To make use of the library's own spring context, I used to load it through:
def ctx = new ClassPathXmlApplicationContext( 'classpath:/applicat...
I would like to use certain plugin in development environment, but would like to exclude this plugin from production and from generated war. What is the easiest way to accomplish this?
...
I need a way to be able to have a domain class to have many of itself. In other words, there is a parent and child relationship. The table I'm working on has data and then a column called "parent_id". If any item has the parent_id set, it is a child of that element.
Is there any way in Grails to tell hasMany which field to look at ...
We've been using Grails for a little while now and have been through a few Grails versions now. We don't always want to migrate our 'older' apps immediately but often use a newer version for new development. Changing the Windows environment variables is inconvenient since I sometimes have to work on two related projects at the same time ...
Hi,
i am quite new to Grails and on the lookout for a plugin to attach files (images) to a model. something like a uploaded avatar-picture for a user.
in Ruby on Rails i used the fantastic Paperclip plugin. Someting like that would be absolute awesome.
Thanks for your help.
...
I'm trying to use Groovlets in place of JSPs in an integration framework but one of the vendor's libraries relies on the javax.servlet.jsp.PageContext available in a JSP. I found the GroovyPagesPageContext class that's part of Grails for GSPs.
Anyway to use Groovy in this situation and have a handle to the jsp PageContext? I have not...
The Grails code below throws the following exception when trying to .save() the Foo object:
org.hibernate.TransientObjectException/
org.springframework.dao.InvalidDataAccessApiUsageException:
object references an unsaved transient instance -
save the transient instance before flushing: Bar
I guess I'm missing out on some of the GORM...