Questions tagged [grails-2.2]

Grails is a web application framework that uses Groovy and Java. The framework is oriented around high-productivity application development, and uses common Java technologies such as Hibernate and Spring.

Grails is a web application framework that uses Groovy and Java. The framework is oriented around high-productivity application development, and uses common Java technologies such as Hibernate and Spring.

136 questions
1
vote
1 answer

sort case insensitive in list method of a named query in Grails with MongoDB

Is there a way to specify that a list in a namedquery is case insensitive? I think that before grails 2.2 this was by default, but with Grails 2.2.3 is not working... This is the line of my code that makes the call to the named query and tries to…
Eylen
  • 2,617
  • 4
  • 27
  • 42
1
vote
1 answer

Grails - Cannot unit test a enum located in domain package/folder

I have a enum public enum Foo { FOO1(true) FOO2(false) FOO3(true) boolean respectACondition Foo(boolean isRespecting) { respectAContidion = isRespecting } boolean isRespecting() { …
Thermech
  • 4,371
  • 2
  • 39
  • 60
1
vote
2 answers

Grails mock same method many times with different result

I want to mock a object method that is called many times, and each times the result must be different. Here what I'm trying to do: fooMock.demand.someMethod(3..3) { -> //call1 if (**some condition**) return 1 //call2 if…
Thermech
  • 4,371
  • 2
  • 39
  • 60
1
vote
4 answers

Replace a method with parameters by a closure in metaclass

I have two class: class Foo { String doSomething(String a, String b) { return 'Not Working' } } class Bar { String methodIWannaTest() { return new Foo().doSomething('val1', 'val2') } } And I want to replace…
Thermech
  • 4,371
  • 2
  • 39
  • 60
1
vote
1 answer

Howto get a map from params in Grails Controller?

I'm trying to retrieve in the controller a complex object sent from the client (via ajax) in JSON format, but I don't know how to get from params the map in which are converted some of the properties. For example, imagine this is the "complex" JSON…
Eylen
  • 2,617
  • 4
  • 27
  • 42
1
vote
1 answer

Grails scaffolding with embedded

With those domain class class Foo { Bar bar static embedded = [ 'bar' ] } class Bar { String name } And a controller class FooController { static scaffold = Foo } I got a error whe accessing…
Thermech
  • 4,371
  • 2
  • 39
  • 60
1
vote
2 answers

How to create a criteria in Grails with a conjunction(and) of two disjunctions(or) using MongoDB?

I'm trying to get all the activities from a user or its teams also filtered by some types if some properties are set. This is what I have right now: Activity.withCriteria{ and{ or { eq 'user',myUser "in"…
Eylen
  • 2,617
  • 4
  • 27
  • 42
1
vote
1 answer

Webflow: it's possible to switch between flows?

I have two controllers and each one have a flow. In my menu I have a link to the flows. If I'm in flow #1 and click in the link of the flow #2, Grails will show me the view of the flow #1. The only way I found to make this transition work was to…
user800014
1
vote
1 answer

Grails 2.2.0 upgrade causing protocol buffers mismatch

We are in the process of upgrading our grails 2.0.3 application to grails 2.2.0 with groovy 2 and jdk 1.7. However, we found that grails 2.2.0 comes with protobuf-java 2.4.1 which is causing a mismatch with a jar that our application uses to talk to…
mpandit
  • 11
  • 2
1
vote
0 answers

Grails event-push sending event twice or not sending in IE8

I'm having an strange behaviour using grails event-push plugin with IE8. I'm using grails 2.2, event-push 1.0M7 and also AngularJS (but this shouldn't be the problem). I have defined the event in MyEvents.groovy in conf dir events = { …
Eylen
  • 2,617
  • 4
  • 27
  • 42
1
vote
2 answers

custom jquery css images not found with grails 2.2.0 and resource plugin

Trying to use a custom jquery ui theme in grails 2.2.0 using the resource plugin. However I can't seem to get it configured so that the images referenced inside the custom.css file will render. For example I continue to get 404 errors for urls…
Bob
  • 81
  • 7
0
votes
0 answers

Grails module inside maven archetype parent project not able to load grails plugins inside grails module

I have a parent maven archetype reactor project having a grails 2.4.4 project as submodule (standalone grails 2.4.4 project in process to a multimodule project), all build phases are working fine only during integration test (the grails project is…
0
votes
1 answer

Grails No thread-bound request found error?

Following spring securty and saml plugin tutorial i have created a simple app. Here are links to the tutorial i followed to create simple hello world…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

Grails Cannot create a session after the response has been committed?

I added a grails filter to redirect urls with www to non www url. After this change many errors have been triggered of this nature. The change was to add a filter as shown below class DomainFilters { def filters = { wwwCheck(uri:'/**')…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
1 answer

Using multiple mockFor() in grails 2.2.3 unit test

I want to write a unit test for my controller which uses multiple services inside it. How can I use multiple mockFor() for services? Tnx.
pioneer
  • 23
  • 3