Last change
on this file since 260 was
247,
checked in by duh, 12 years ago
|
|
-
Property svn:keywords set to
Author Rev Date
|
File size:
618 bytes
|
Rev | Line | |
---|
[29] | 1 | /** |
---|
| 2 | * Base Filters |
---|
[172] | 3 | * @Author Jeroen Wesbeek |
---|
| 4 | * @Since 20091026 |
---|
| 5 | * @see main.gsp |
---|
| 6 | * @see http://grails.org/Filters |
---|
[29] | 7 | * @Description |
---|
| 8 | * |
---|
| 9 | * These filters contain generic logic for -every- page request. |
---|
| 10 | * |
---|
| 11 | * Revision information: |
---|
| 12 | * $Rev: 247 $ |
---|
| 13 | * $Author: duh $ |
---|
| 14 | * $Date: 2010-03-08 17:29:14 +0000 (ma, 08 mrt 2010) $ |
---|
| 15 | */ |
---|
| 16 | class BaseFilters { |
---|
[172] | 17 | // define filters |
---|
| 18 | def filters = { |
---|
| 19 | defineStyle(controller: '*', action: '*') { |
---|
| 20 | // before every execution |
---|
| 21 | before = { |
---|
| 22 | // set the default style in the session |
---|
| 23 | if (!session.style) { |
---|
| 24 | session.style = 'default_style' |
---|
| 25 | } |
---|
[246] | 26 | |
---|
| 27 | // set session lifetime to 1 week |
---|
| 28 | session.setMaxInactiveInterval(604800) |
---|
[172] | 29 | } |
---|
[32] | 30 | } |
---|
[29] | 31 | } |
---|
| 32 | } |
---|
| 33 | |
---|
Note: See
TracBrowser
for help on using the repository browser.