title: How do I display all selected options from multiselect listbox in edit view on Grails?
body: <p>I am new to Grails development and have been having issues with <code>&lt;g:select&gt;</code>  when it is used for a multi-select list. In my form, users can select between 1 to 6 options in a multi-select list box. They can then go back to an edit view to make changes. </p>
  
  <p>The form successfully saves all the options that were selected, but if more than one option was selected, the listbox won't display that <em>any</em> were selected in the edit view. If only one option was selected however, it is displayed in the edit view correctly. </p>
  
  <p>Could someone please give me some idea of how to fix it so that all selected options are displayed in edit view? (Running Grails 2.0.3)</p>
  
  <p>Here is my <code>&lt;g:select&gt;</code> code in the GSP:</p>
  
  <pre><code>&lt;g:select selected="true" multiple="true" name="securityGroup"
            from="${['Mainframe', 'Finance', 'EDI', 'Item Master', 'Risk Management', 'Telecomm']}"
            value="${MFAdminInstance?.securityGroup}"/&gt;
  </code></pre>
  
  <p>Domain: </p>
  
  <p>class MFAdmin {</p>
  
  <pre><code>static constraints = {
  
      name(nullable:false, blank:false, unique:true)
      briefDetail(nullable:false, blank:false)
      details(blank:false)
      recsz(nullable:false, blank:false)
      securityGroup(nullable:false, blank:false)
      files(nullable:false, blank:false)
      begJCL(nullable:false, blank:false)
      addJCL1(nullable:true, blank:true)
      addJCL2(nullable:true, blank:true)
      endJCL(nullable:false, blank:false)
  
  }
  
  String name
  String briefDetail
  String details
  String recsz
  String securityGroup
  Integer files
  String begJCL
  String addJCL1
  String addJCL2
  String endJCL
  </code></pre>
  
  <p>}</p>