Reputation: 4702
This is probably one very simple question to answer, but I can't output the variable I am trying to send to a view through a controller in the Grails Framework.
render(view: 'parseerror', error: it)
That's my code in my controller, it renders the view correctly but as soon as I am trying to call the variable through ${error}
it outputs nothing. It should output a string since when I print the iterator, the console output: The example string
Thanks for helping me out :)
Upvotes: 0
Views: 125
Reputation: 919
The map key is "errors", not "error", but I belive, you want to achieve something similar to this code:
render( view: 'parseerror', model: [ 'error': error ] )
Upvotes: 3