grails multiple select: values are not stored in related object

后端 未结 1 783
伪装坚强ぢ
伪装坚强ぢ 2021-01-28 08:54

I have a multiple select as follows:



        
相关标签:
1条回答
  • 2021-01-28 09:24

    You named the select tag "receiptItems", so in the Controller inspect that parameter and then add it to the receiptInstance:

    params?.receiptItems?.each {
        def service = HealthService.get(it)
        receiptInstance.addToHealthServices(service)
    }
    
    0 讨论(0)
提交回复
热议问题