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

Key: GRAILS-2850
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Graeme Rocher
Reporter: Yai Me
Votes: 0
Watchers: 0
Operations

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

The behavior of a grails application in conjuction with filters is different when using the scaffold and the generated code in controllers

Created: 20/Apr/08 12:49 PM   Updated: 23/Apr/08 02:35 AM
Component/s: Scaffolding
Affects Version/s: 1.0.2
Fix Version/s: 1.0.4

Time Tracking:
Not Specified

Environment: Linux amd64


 Description  « Hide
I coded a filter like the one shown in "6.6.2 Filter Types" of the Grails user guide. The filter manipulates the params object (e.g changes an attribute called 'name' that exists in the params object).

class SomeFilters {
def filters = {
someFilter(controller:'person', action:'save') {
before = { params['name'] = "Changed!" }
}
}
}

If in the 'person' controller scaffold code is enabled (def scaffold = true), the changed value is not registered and the 'name' attribute continues to have the same value it had. If I generate the code in the controller (without altering the generated code at all) the 'name' property is changed to 'Changed!' (the desired value)

Shouldn't the behavior be consistent among these two cases? Shouldn't the changed value persist?



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.