Questions tagged [grails3]

Grails 3 is the next major version of the Grails framework. This tag can/should be used with all Grails 3.x version so that the users on StackOverflow don't have to filter each specific Grails version (for example, 3.1.10, 3.2.0-m2) and they can filter every question which is related to Grails 3.

289 questions
0
votes
1 answer

GRAILS respond with atomic json values

I have actions that make sense to return an atomic value of json (user/hasPrivilege, etc) and would like my response to just contain "true" or "false", I'd also like to be able to send raw numbers and strings. I think these would count as valid…
nclu
  • 1,057
  • 1
  • 8
  • 19
0
votes
2 answers

Rendering few models in gson

Is it possible to send few objects into gson rendering view? I tried to use in controller: respond trainings, [status: OK, view:"trainingsByClients", model: [myVariable: "test", anotherVariable: 123]] and in gson view: model { …
Michal_Szulc
  • 4,097
  • 6
  • 32
  • 59
0
votes
1 answer

Rendering command object in gson

I'm using Grails 3 and org.grails.plugins:views-json:1.0.0. Is it possible to render command object as a json result? Is it rendering only domain classes provided in a model? I tried: model { TrainingStatisticsCommand cmd } json.cmd { …
Michal_Szulc
  • 4,097
  • 6
  • 32
  • 59
0
votes
2 answers

How to register custom validator class in Grails 3

I want to implement a custom validator class. There are some tutorials out in the internet e.g. http://blog.swwomm.com/2011/02/custom-grails-constraints.html In these tutorials is described that you must register the validator class in the…
Andreas
  • 380
  • 2
  • 14
0
votes
2 answers

how to use beforeInsert and afterInsert in grails3 domain

Iam upgrading grails2 project to grails3. i've some logic in beforeUpdate and afterInsert but as grails3 removed before and after interceptors How can i use that logic in grails3?
Naresh
  • 333
  • 1
  • 2
  • 9
0
votes
0 answers

Creating custom gradle task inside Grails plugin

I am trying to create a Grails plugin that creates a custom Gradle Task which can be depended on by bootRun. I would like to do something like this: @CompileStatic static void configureProcessConfig(Project project) { TaskContainer…
0
votes
0 answers

Inheriting in domain GORM classes

domain classes: class Carnet extends Purchasable{ Payment payment } class Training extends Purchasable{ static hasMany = [payments:Payment] } class Payment { static belongsTo = [purchase:Purchasable] } class Purchasable { Float…
Michal_Szulc
  • 4,097
  • 6
  • 32
  • 59
0
votes
2 answers

Grails 3 - get rendered view from service

I'm using Grails Views and want to store the JSON outputted from a rendered template in the database. I'm not trying to send the rendered template to the user, only to store it for later user. How can I get do this?
Anonymous1
  • 3,877
  • 3
  • 28
  • 42
0
votes
2 answers

URL Mapping broken for actions other than index in standalone WAR for Grails 3 App

I'm new to GRAILS but I built a simple app and I'm trying to deploy it to tomcat. If I run the app using: grails prod run-app everything works fine. However, if I build it to a war file grails prod war then either upload the war package to a…
J B
  • 1
  • 1
0
votes
1 answer

User authentication failing after upgrading to 3.2.1

I just upgraded my app from Grails 3.2.0 to 3.2.1 due to some problems and the user authentication started failing. I'm using Grails Spring Security Core plugin version 3.1.1. I'm getting the following…
Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
0
votes
1 answer

Interceptor in grails for CORS - GET works but not PUT, POST, DELETE

Grails 3 war under tomcat, angular 2 running under nginx I am using grails 3.2.0.M2. I have used the default controller from using the rest profile so essentially all of the code is in the UrlMappings.groovy file. Here is the interceptor…
John
  • 1,593
  • 3
  • 17
  • 28
0
votes
1 answer

Grails upgrade to 3.x from 2.x. Ajax does not render template after upgrade

I am working on an upgrade of grails application from grails 2.5.4 to 3.1.9 and I am having trouble with ajax calls. I have gsp templates inside my application which use ajax requests to load data from server asynchronously. Here is one of…
Michael.D
  • 179
  • 1
  • 15
0
votes
1 answer

Grails 3.2.0 deployed on Tomcat getting 404

Hey just upgraded to Grails 3.2.0 (from 3.2.0.RC2) and tried deploying to Tomcat 7.0.64 and Tomcat 8.5.5 running Java 8.0_101. I now just get a 404 error from Tomcat but doing a run-app all is good. Tomcat deploys without error and I can see the…
Joe
  • 1,219
  • 8
  • 13
0
votes
1 answer

Grails 3 - GORM for MongoDB - nearest read for replica set

I'm upgrading my Grails 2.4 web application to Grails 3, and I'm considering switching from my custom DAO to GORM for my Mongo database. I'm trying to understand how to setup GORM correctly, in particular about connection options, but its…
ilPittiz
  • 734
  • 1
  • 10
  • 23
0
votes
1 answer

How to customize the fields order and widget using the default templates in grails 3?

I would like to set the order of the fields displayed in the default templates of grails 3 (using the f:all, f:table tags etc). I would also like to specify the widget to use for the field without specifying a different template for it (I know about…
1 2 3
19
20