Home Can't drop in the db when i unselect an item in a multi select component
Reply: 0

Can't drop in the db when i unselect an item in a multi select component

user1057
1#
user1057 Published in April 22, 2018, 10:04 pm

I have a many to many relationship between typeCause and Client

My problem is when i unselect an item from my mutliselect component and submit it, the unselected item is not dropped in the DB

here the url that i hit http://localhost:8080/flp/typeCause/list?search.client.id=9

the url trigger the execution of this namedQuery:

search { params ->
            if (params.client.id) {
                clients {
                    'in' 'id', params.list('client.id')*.toLong()
                }
            }
        }

and here a the view :

   <div class='fieldcontain typeCauses'>
    <label for='typeCause.label'>
      <g:message code='typeCause.label' />
    </label>
    <g:select from='${TypeCause.list()}' multiple='true' name='typeCauses' optionKey='id' value='${clientInstance?.typeCauses*.id}'></g:select>
  </div>

Note that my controller is scaffolded

Thank u in advance for the help

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302173 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO