I'm playing around with Grails webflow and having surprising difficulty reading param values from the request. I have defined a simple flow as follows:
def testFlow = {
stepOne{
String name = params.name
render(view: "stepTwo", [name: name])
}
...
}
The problem I'm having is that the name parameter is not resolving to the name value I'm passing in in the request, but rather it is assigned the String value "org.codehaus.groovy.grails.commons.metaclass.PropertyExpression" which is the name of the class of the implicit 'params' object that is present in Grails controllers.
If I put the same parameter assignment in a non-webflow controller closure (i.e. a standard controller closure), the assignment works as you would expect and the 'name' object is assigned the value that I pass in via the request params.
Am I overlooking something glaringly obvious here (wouldn't be the first time) or has anyone else seen the same sort of issue? I have also tried accessing the param value using params['name'] and params.getProperty('name') but in all cases the result is the same.