title: Grails remoteFunction ajax assistance
body: <p>I'm really struggling with getting the percentage value of progress that is continuously being updated in a function on my controller to appear in template GSP page using <code>remoteFunction</code>.</p>
  
  <p>This is my controller code and "progressData" is sent from a service to constantly update the current progress of a task:</p>
  
  <pre><code>def progress(progressData) {
  
     def statusToView = progressData
  
     [statusToView: statusToView]
  }
  </code></pre>
  
  <p>and in my _progress.gsp page:</p>
  
  <pre><code>&lt;g:javascript&gt;
      setInterval( "refreshMe();", 300 );
      function refreshMe(){
         ${remoteFunction(action:'progress', controller:'data')}
      }
  &lt;/g:javascript&gt;
  </code></pre>
  
  <p>The controller is expecting the property <code>progressData</code> which is doesn't get from the <code>remoteFunction</code>, and so I'm guessing I have to think to do this another way but I'm just at a bit of a loss now. Plus I'm not getting the value <code>statusToView</code> within the GSP because of this.</p>