History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GRAILS-1811
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Graeme Rocher
Reporter: Darryl Pentz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Grails

Filters - filters.FilterConfig Setting xxxxxx is invalid for filter config xxxxxx

Created: 09/Nov/07 07:17 AM   Updated: 23/Nov/07 08:55 AM
Component/s: Configuration
Affects Version/s: 1.0-RC1
Fix Version/s: 1.0-RC2

Time Tracking:
Not Specified

Environment: Windows XP SP2, dual core, running in Jetty, 2G RAM, default Grails project settings


 Description  « Hide
When creating a filter, I was unable to add additional methods to the filter class without getting the additional method reported as a problem.

Test case is as follows:

1. Setup a filters class as follows:
class SecurityFilters {
def filters = {
loginCheck(controller:'', action:'') {
before = {
Date now = getNow()
println "${now} before() called"
}
}
}

def getNow() { println "Into getNow()" return new Date() }
}

2. Run grails run-app. You'll probably need to add some dummy controller to your project to trigger the filter.

3. Note in the output logging the following lines:

[18078] filters.FilterConfig Setting getNow is invalid for filter config getNow
Into getNow()
Fri Nov 09 14:48:55 CAT 2007 before() called

So even though getNow() is actually called, it seems, Grails is not altogether happy with the setup of the Filters class.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Darryl Pentz - 09/Nov/07 07:19 AM
Copy and paste issue above. The loginCheck line in my test case did have the asterisks between the quotes. They're missing above. Please edit accordingly when verifying this issue.