Getting params attribute as list()

14 / Jun / 2010 by niraj 2 comments

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

FOUND THIS USEFUL? SHARE IT

comments (2)

Leave a Reply to Nicolas Cancel reply

Your email address will not be published. Required fields are marked *