{"action":"created","issue":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/2247","labels_url":"https://api.github.com/repos/harvesthq/chosen/issues/2247/labels{/name}","comments_url":"https://api.github.com/repos/harvesthq/chosen/issues/2247/comments","events_url":"https://api.github.com/repos/harvesthq/chosen/issues/2247/events","html_url":"https://github.com/harvesthq/chosen/issues/2247","id":58697344,"number":2247,"title":"chosen:updated lost the field value when it was a multiple selection","user":{"login":"cidylong","id":11171226,"avatar_url":"https://avatars.githubusercontent.com/u/11171226?v=3","gravatar_id":"","url":"https://api.github.com/users/cidylong","html_url":"https://github.com/cidylong","followers_url":"https://api.github.com/users/cidylong/followers","following_url":"https://api.github.com/users/cidylong/following{/other_user}","gists_url":"https://api.github.com/users/cidylong/gists{/gist_id}","starred_url":"https://api.github.com/users/cidylong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cidylong/subscriptions","organizations_url":"https://api.github.com/users/cidylong/orgs","repos_url":"https://api.github.com/users/cidylong/repos","events_url":"https://api.github.com/users/cidylong/events{/privacy}","received_events_url":"https://api.github.com/users/cidylong/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-24T06:02:47Z","updated_at":"2015-03-04T23:15:12Z","closed_at":"2015-03-04T23:15:12Z","body":"This is a very easy reproduce issue.\r\n\r\nI got this issue from my Spring MVC project. Spring version is 4.1.2. Chosen version is 1.3\r\n\r\n1. Build a form:select field with multiple selection support in a spring form. I included chosen.css, chosen.jquery.js, chosen.proto.js chosen-sprite.png and chosen-sprite@2x.png in my class path.\r\n\r\n2. I modified chosen.css to point the images to right location.\r\n\r\n3. include <link href=\"${pageContext.request.contextPath}/css/chosen.css\" rel=\"stylesheet\"/> and <script type=\"text/javascript\" src=\"${pageContext.request.contextPath}/js/chosen.jquery.js\"></script>\r\n\r\n4. Define my form:select fields: \r\n<form:select class=\"chosen-container\" id=\"siteentity_siteSurroundings\" path=\"siteSurroundings\" multiple=\"true\" cssStyle=\"width:300px;\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<form:option value=\"None\" label=\"*** Setup Your Surroundings ***\"></form:option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<form:options items=\"${fn:split(sitesurroundings_t, ',')}\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form:select>\r\n5. call chosen function from javascript: <script type=\"text/javascript\"> \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$(\"#siteentity_siteSurroundings\").trigger(\"chosen:updated\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$('#siteentity_siteSurroundings').chosen();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</script>\r\n\r\nEdit and save is working well.\r\n\r\n6.When I load it back from DB and edit that field again, problem comes:\r\n\r\na. If I only select one item to save into DB, reload it back to JSP, the form:select field render properly, there is one item was selected in the field.\r\nb. If I selected two or more items to save it to DB, the saving is works, that field value is combination of all selected value separated by ','. i.e.. it is one single string saved in DB. When we use the same JSP load the form:select field value back from DB, there is nothing shows in the selected field. All lost.\r\n\r\nI believe it is a bug, developer don't handle multiple selection result case at all.\r\n\r\nIf it is true, please have it follow up. Actually it is a very nice program, well done, guys!\r\n\r\nPlease"},"comment":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/comments/77271840","html_url":"https://github.com/harvesthq/chosen/issues/2247#issuecomment-77271840","issue_url":"https://api.github.com/repos/harvesthq/chosen/issues/2247","id":77271840,"user":{"login":"pfiller","id":545995,"avatar_url":"https://avatars.githubusercontent.com/u/545995?v=3","gravatar_id":"","url":"https://api.github.com/users/pfiller","html_url":"https://github.com/pfiller","followers_url":"https://api.github.com/users/pfiller/followers","following_url":"https://api.github.com/users/pfiller/following{/other_user}","gists_url":"https://api.github.com/users/pfiller/gists{/gist_id}","starred_url":"https://api.github.com/users/pfiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfiller/subscriptions","organizations_url":"https://api.github.com/users/pfiller/orgs","repos_url":"https://api.github.com/users/pfiller/repos","events_url":"https://api.github.com/users/pfiller/events{/privacy}","received_events_url":"https://api.github.com/users/pfiller/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T23:15:12Z","updated_at":"2015-03-04T23:15:12Z","body":"Closing until more info (and a reproduction) are provided."}}