title: ArrayList and Map problem in grails
body: <p>I have a service that contains a map:</p>
  
  <pre><code>static Map cargosMap = ['1':'item1','2':'item 2','3':'item 3']
  </code></pre>
  
  <p>that is returned via a method in the service:</p>
  
  <pre><code> static Map getCargos() {
      [cargosMap]
   }
  </code></pre>
  
  <p>A controller calls it like this:</p>
  
  <pre><code>def mform = {
  
      Map cargos = empService.getCargos()
  
      [cargos:cargos]
  }
  </code></pre>
  
  <p>In the gsp, I have the select:</p>
  
  <pre><code>&lt;g:select name="cg1" from="${cargos}" /&gt;
  </code></pre>
  
  <p>But I'm getting the exception:</p>
  
  <pre><code> Error 500: Executing action  ....caused exception: 
     org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object
     ...  
     with class 'java.util.ArrayList' to class 
    'java.util.Map'
  </code></pre>
  
  <p>Any clues ? Thanks</p>