خرید بک لینک

Vote count: 0

i'm trying to use multiple values for a select using <g:select multiple='true'>, but when i try to save the form to the DB, i got this error Property [Languages] of class [class com.Myapp.hr.EmploymentSeeker] with value [french,english] is not contained within the list [[french, english, russian, chinese]]

here is my Domain:

class EmploymentSeeker {
 String languages
static constraints = {
languages(nullable:true,inList:Holders.config.languages)
 }

}

Config file :

languages=[
'french',
'english',
'russian',
'chinese'
]

GSP:

<g:select  multiple="true" name="languages" from="${employmentSeekerInstance.constraints.languages.inList}" value="${employmentSeekerInstance?.languages}" valueMessagePrefix="empSeeker.languages" noSelection="['': '']"/>

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 13 ارديبهشت 1395 ساعت: 4:54

صفحه بندی