Getting params attribute as list()
following are two methods for getting parameters from GSP in form of list only:-
even if the variable has only one value, it will be recieved as a list and not as “String”.
List<String> myList = params.list(‘variableName’)
List<String> myList = [params.variableName].flatten()
~~Niraj Kumar~~
niraj@intelligrape.com
http://www.tothenew.com
Thanks a lot for this help. I was blocked trying to get a list from a String.
Hey Thanks Niraj,
Your post helped me with my grails list binding issue. Good work!