Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails params long array

I want to understand how can I handle an array of Long in params. I understand that a Long param can be handled as params.long('var') and an array can be handled as params.list('var') but not clear on how to handle an array of Long.

Thanks.

like image 231
saurabh Avatar asked Mar 30 '26 16:03

saurabh


1 Answers

I don't know what you mean by "handle"? You can retrieve a list using params.list('param'). If you want to convert that to an array of Long use:

Long[] arrayOfLong  = params.list('param')
like image 152
Dónal Avatar answered Apr 02 '26 14:04

Dónal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!