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?