Questions tagged [grails-controller]

This tag is about the controllers in Grails Open Source Framework technology.

Grails is an Open Source, full stack, web application framework for the JVM. It takes advantage of the Groovy programming language and convention over configuration to provide a productive and stream-lined development experience.

This tag is about the controllers in Grails technology.

467 questions
3
votes
0 answers

Grails custom ErrorController catch an exception but property request.exception is null

My application works on grails 2.3.1. Some days ago I noticed strange behaviour of error controller. Grails calls error controller but request.exception is null. It seems this happened after application was updated from grails 2.2.x to 2.3.x and we…
Andrej Soroj
  • 1,103
  • 1
  • 9
  • 10
3
votes
1 answer

Grails oauth plugin: Unknown provider linkedin, check your configuration

How to get Connected With Linked In Grails ?? Config.groovy oauth { linkedin { requestTokenUrl="https://api.linkedin.com/uas/oauth/requestToken" accessTokenUrl="https://api.linkedin.com/uas/oauth/accessToken" …
3
votes
1 answer

how to control dynamic rows coming from a form in a controller

I have a form which sends over dynamic number of rows and columns. Here is a demo on jsFiddle of how the form looks like. I have columns of Red, Yellow, and Green and there could be dynamic number of rows associated with these colors shades. Each…
Anthony
  • 33,838
  • 42
  • 169
  • 278
3
votes
2 answers

Grails REST CRUD Controller Methods

I am pretty new to Grails, though I do have a lot of experience developing webapplications using other mvc frameworks in different languages (Perl, Python, Ruby). I am trying to understand the implications of CRUD in grails. Basically Grails creates…
PWFraley
  • 1,052
  • 12
  • 20
3
votes
1 answer

Unit test controller by calling multiple actions

I have a very similar problem to the one described in this question. (The main difference being that i am using Grails 2.1). Basically i want to write a unit test which does sth like: // set params so i can create an obj. def results =…
NoUsername
  • 693
  • 6
  • 20
3
votes
2 answers

Child class object can not delete

I have some domain class Incident,Problem, Category, Impact, Urgency etc. Class Incident { Category category String subject Impact impact } Class Problem { Urgency urgency Category category String title } Class Category { …
sanghavi7
  • 758
  • 1
  • 15
  • 38
3
votes
2 answers

Redirection in Grails Web-flow

I have question regarding redirection in Grails web-flow. I am in a view state which will allow users to enter the answers for a question. On 2 wrong attempts I should be able to re-direct the user to view page from different controller. What i mean…
2
votes
2 answers

Grails data binding - command objects with Lists

Grails 1.3.7 Trouble with data binding Command objects that have List content. Example Command: class Tracker { String name String description List units = new ArrayList() } class Unit { String name Long unitMax Long…
Todd M
  • 1,012
  • 1
  • 15
  • 25
2
votes
1 answer

How can i trigger a onFailure event for g:formRemote?

I am using grails and i have a basic form remote //Some inputs + submit…
2
votes
2 answers

How can I substitute my own custom dynamic scaffolding methods

My grails app has to define some additional behaviour for many of the standard dynamic scaffolding methods for each domain class. I know I can duplicate the methods I need to add to for each controller, and indeed that is what I currently do. This…
Michael Rutherfurd
  • 13,815
  • 5
  • 29
  • 40
2
votes
1 answer

Grails: Dynamically call another action

Is it possible to call another controller-action with the name of the controller-action being passed as a parameter. Something like this: View:
ibaralf
  • 12,218
  • 5
  • 47
  • 69
2
votes
1 answer

Grails formRemote: why does it always redirect?

I am trying to use the tag g:formRemote in grails. In head definition: view:
M.R.
  • 1,959
  • 4
  • 24
  • 32
2
votes
2 answers

How can I replace a scaffolded controller action and still call the original in Grails?

I need to 'override' a scaffolded action in a controller, do some stuff and then invoke the original. I would prefer to use the dynamically generated method and not have to cut and paste the code. class AccountController { static scaffold =…
David Tinker
  • 9,383
  • 9
  • 66
  • 98
2
votes
2 answers

How to access command objects from filter and is it possible at all?

I often write something like: def myAction{ MyActionCommand cmd -> if( cmd.hasErrors() ){ return render(status:HttpServletResponse.SC_BAD_REQUEST ); }else{ // actual action logic } So, I'd like to…
alebu
  • 420
  • 1
  • 5
  • 15
2
votes
3 answers

Grails g:include can it be done?

Im wondering if it is possible to use g:include to include only the body contents of a given page. Say i have a main layout page as follows: My start page
netbrain
  • 9,194
  • 6
  • 42
  • 68