December 2013
Beginner to intermediate
222 pages
5h 13m
English
Let’s examine the TekEventController first: what is it doing for us, and what else we can do with it? Open TekDays/grails-app/controllers/com/tekdays/TekEventController.groovy, and follow along as we take a look at it in chunks:
| beyond.2/TekDays/grails-app/controllers/com/tekdays/TekEventController.groovy | |
| | package com.tekdays |
| | |
| | import static org.springframework.http.HttpStatus.* |
| | import grails.transaction.Transactional |
| | |
| | @Transactional(readOnly = true) |
| | class TekEventController { |
| | |
| | static allowedMethods = [save: "POST", update: "PUT", delete: "DELETE"] |
| | |
| | def index(Integer max) { |
| | params.max = Math.min(max ?: 10, 100) |
| | respond TekEvent.list(params), |
| | model:[tekEventInstanceCount: TekEvent.count()] ... |
Read now
Unlock full access