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
0
votes
1 answer

Error using spring-security plugin in grails

I have been trying to integrate spring-security in one of my grails applications. As mentioned in the tutorial for spring security, I installed the plugin using the following code BuildConfig.groovy: I added the following code repositories…
Rammohan
  • 493
  • 6
  • 27
0
votes
0 answers

Grails and Hibernate Plugin

I am quite new to Grails, and I am on version 2.2.4. I got some tests I want to run: package racetrack import grails.test.mixin.* import org.junit.* /** * See the API for {@link grails.test.mixin.domain.DomainClassUnitTestMixin} for usage…
Trt Trt
  • 5,330
  • 13
  • 53
  • 86
0
votes
1 answer

How to add default values to hasMany in Grails?

Say I have a domain Books. static hasMany = [reader:Reader] And Class Reader String fullName Now I want to add Readers with fullName: "PersonA", "PersonB", "PersonC" by defualt in the Books domain. Please tell how do I accomplish this? I am pretty…
Yash Agarwal
  • 955
  • 1
  • 13
  • 28
0
votes
1 answer

GORM 'or' criteria issue

or { userTerm { and { le('startDate', endDate) ge('endDate', startDate) } } schoolTerm { and { le('startDate', endDate) ge('endDate', startDate) } } } 'or' condition should…
user1298426
  • 3,467
  • 15
  • 50
  • 96
0
votes
1 answer

Grails actions getting called twice

The getStarted action redirects to companyInfo action which renders companyInfo.gsp and immediately after the page rendering, companyInfo action getting called one more time. I don't understand what the problem is. class MyController { …
emilan
  • 12,825
  • 11
  • 32
  • 37
0
votes
1 answer

Why are there two ways to configure plugins for grails?

A grails application I work with has two ways to include plugins: first in the application.properties…
Jay Prall
  • 5,295
  • 5
  • 49
  • 79
0
votes
2 answers

When I use ckeditor toolbar, it adds html tags instead of adding desired effects while displaying

I am using ckeditor which was working fine when I used it with grails 1.3.7. Now I upadated my codebase to grails 2.2.4 & ckeditor is giving me some issue. When I write someting & use toolbar to format it, I get output containing html tags. For…
user1298426
  • 3,467
  • 15
  • 50
  • 96
0
votes
0 answers

How to access authenticated user in other than Authentication Controller in Grails?

I am using Authentication 2.0.1 spring security plugin to authenticate my web services . I am in success to login and set user session through Authentication Service . I also get sessionUserand isLoggedIn in success response in Authentication…
Abhijit Muke
  • 1,194
  • 3
  • 16
  • 41
0
votes
1 answer

Values are not assigned if object parameters are changed after private method call in grails 2.2.4

I have a method which calls private method. This method returns model. Once it is returned, I change some object values and render it. On jsp when I print value of 'message' then I do not get that value. Here is the code def model =…
user1298426
  • 3,467
  • 15
  • 50
  • 96
0
votes
1 answer

flash.message does not print message on the screen in grails 2.x

My functionality is I have a list of users. When I click on any of the users to edit his information a new window pop up. I change some values and click on save. Now values are saved correctly but 'saved successfully' message is not displayed. My…
user1298426
  • 3,467
  • 15
  • 50
  • 96
0
votes
1 answer

Set in domain not working after upgrading grails

Recently I upgraded grails from 1.3.4 to 2.2.2 and I'm getting following error while trying to iterate over a Set defined as hasMany in a domain. class A { String name static hasMany = [bList: B] } class B { static belongsTo = [a:A] } class…
Hussain Fakhruddin
  • 3,202
  • 4
  • 25
  • 36
0
votes
1 answer

grails replace method with an optional parameter by a closure

I have two class: class Foo { String doSomething(String a = 'Not working') { return a } } And I want to replace 'doSomething' in a test but it dosent work @Test void testMethodIWannaTest() { Foo.metaClass.doSomething = {String a…
Thermech
  • 4,371
  • 2
  • 39
  • 60
0
votes
1 answer

GORM (Hibernate) tries to map non-domain classes; gives DuplicateMappingException

I am upgrading my Grails app from version 2.1.0. Prior to this upgrade the application was behaving fine. I downloaded and set-up the new version of Grails (initially I tried version 2.2.1 but tried going to 2.2.2 today) and did a Grails upgrade on…
David
  • 1,940
  • 3
  • 17
  • 30
0
votes
2 answers

Grails one to one on two domain object

I want to add a child to two different parent class, like that: First: class Member { Profile profile Member() { this.profile = new Profile() } static mapping = { profile cascade: 'all-delete-orphan' …
Thermech
  • 4,371
  • 2
  • 39
  • 60
0
votes
1 answer

grails i18n don't change the code attribute

I'm new in Grails and try to use the i18n-plugin which is standardly integrated in the grails-framework (I use 2.2.1). I use the dynamic scaffolding and wondered that the labels of the variables of my domain model didn't changed with the values of…
Der_V
  • 177
  • 1
  • 16