title: About bean of hasErrors
body: <p>Assuming i have the following object in my controller</p>
  
  <pre><code>objCollection = [obj1, obj2, obj3]
  </code></pre>
  
  <p>And in each obj is the following</p>
  
  <pre><code>obj1 = [
      input = value, inputA1 = valueA1, inputA2 = valueA2
  ]    
  
  obj2 = [
      input = value, inputB2 = valueB2, inputA3 = valueA3
  ]
  
  obj3 = [
      input = value, inputC2 = valueC2, inputA3 = valueA3
  ]
  </code></pre>
  
  <p>And my GSP looks something like this</p>
  
  <pre><code>&lt;div class="control-group ${hasErrors(bean: objCollection.obj, field: 'input', 'error')}"&gt;
      &lt;g:textField name='input' value='${objCollection?.obj}'&gt;
  &lt;/div&gt;
  
  &lt;div id="subForm" class="subContainer"&gt;
      &lt;g:each var='obj' in='${objCollection}' status='a'&gt; 
          &lt;div id='obj${a+1}'&gt;
              &lt;div class='subaccordion'&gt;
                  &lt;div&gt;
                      &lt;g:each var='objInstance' in='${obj}' status="b"&gt;
                          &lt;g:render template="miniForm" model="[b:b, objInstance:objInstance]"/&gt;
                      &lt;/g:each&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/g:each&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>While for the template miniForm</p>
  
  <pre><code>&lt;div class="control-group ${hasErrors(bean: objInstance, field: 'input', 'error')}"&gt;
      &lt;g:textField name='input' value='${objInstance?.obj}'&gt;
  &lt;/div&gt;
  &lt;div class="control-group ${hasErrors(bean: objInstance, field: 'input', 'error')}"&gt;
      &lt;g:textField name='input' value='${objInstance?.obj}'&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Where the name attribute is changed using jquery to input A1, A2, B1, B2, C1 and C3 upon form load.</p>
  
  <p>Now my question is, did i passed the object properly to the bean on hasErrors? Because i tried to get the hasErrors to work but somehow it didn't work to my expectation. </p>
  
  <p>Did i made any mistake anywhere?</p>
  
  <p>Also did i map the object correctly to every input in GSP? I'm not quite sure on how to use the safe operator '?' to avoid nullPointer error.</p>