title: Paginate error - grails dynamic scaffolding
body: <p>On looking for a solution for a two-domain-classes-in-one-view problem, I ran into the scaffolding tutorial for grails where I saw this:</p>
  
  <pre><code>class BookController {
     def scaffold = Book
     // overrides scaffolded action to return both authors and books
     def list = {
       [ "books" : Book.list(), "authors": Author.list() ]
       }
   } 
  </code></pre>
  
  <p>And it says underneath: </p>
  
  <pre><code>All of this is what is known as "dynamic scaffolding" where the CRUD interface is generated dynamically at runtime.
  </code></pre>
  
  <p>I'm quite new to the scaffolding concept, and there is something I don't get here. I expect that the list.gsp is dynamically generated based on the controller return parameters, thus enabling me to have both lists in one view. I don't know if this is possible, it's just the thing that I expect to magically happen here. So please, correct me if I'm wrong.</p>
  
  <p>If this should be the case, then something goes wrong in my application and I get: </p>
  
  <pre><code> org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Tag [paginate] is missing required attribute [total] at /customer/list:45
  </code></pre>
  
  <p>So this is something in the view, which I don't have, because I'm expecting it to get scaffolded. Could it be that the error is caused by the fact, that I use the default templates? Should I create a new template specially for my needs? Also, is there some aricle on grails lifecycle, so that I can see what gets passed when?</p>
  
  <p>Thank you all for the help,
  al</p>