ppazos opened a new issue, #14209: URL: https://github.com/apache/grails-core/issues/14209
### Steps to Reproduce Use the select tag including dataAttrs. ### Expected Behaviour 1. The tag should check for errors like null element 2. It should report what when wrong instead of failing with a generic exception 3. The documentation could be improved with an example of using dataAttrs 4. Add test cases for select using dataAttrs (couldn't find any) ### Actual Behaviour I tracked the issue in the code to this line https://github.com/grails/grails-gsp/blob/5.2.x/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/FormTagLib.groovy#L1122 It seems when passing a map like this [name: it.name] the 'it' used by other `select` options doesn't work, and there is no check for null to provide a correct message of what the error is. I have found, by looking at the code that only this works, which is a little obscure: [name: 'name'], so for other options like optionValue (this works: `optionValue="${{it.templateId +' (v'+ it.versionNumber +')'}}"`) So since dataAttrs don't support using it.xxx we neither can compose values like we can for optionValue, which would be useful for certain cases. ### Environment Information $ grails -version | Grails Version: 5.3.2 | JVM Version: 11.0.10 - **Operating System**: Linux Mint 17.3 ### Example Application - TODO -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
