title: using 3 layouts on same gsp page
body: <p>this is edit of my question that was first how to apply 2 layouts in the same gsp page but now i got problem with 3 layouts :) :</p>
  
  <p>I am fairly new to all that css and layout stuff and i'm using grails 2.0 version
  i have the following moduls in my problem:<br>
  1. main.gsp layout which basically have a nice header with company logo for all pages.<br>
  2. mainTabPanle.gsp layouts which basically contain some main tabs all pages should have
  3. reportTab.gsp layout which basically contain nice report tabs and short javascript code to manipulate chosen tab color that all reports gsp pages should have.</p>
  
  <p>what i am trying to do is to use this reportTab layout in all the reports gsp pages.</p>
  
  <p>so this is what i got so far:</p>
  
  <p>main.gsp:</p>
  
  <pre><code>&lt;!doctype html&gt;  
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}"type="text/css"&gt;
  &lt;g:layoutHead/&gt;
  &lt;r:layoutResources /&gt;
  &lt;/head&gt;
  &lt;body style="height:100%"&gt;
  &lt;div&gt;some nice header in here &lt;/div&gt;
  &lt;g:layoutBody/&gt;
  &lt;r:layoutResources /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>mainTabPanle.gsp (also located in layout folder)</p>
  
  <pre><code>&lt;g:applyLayout name="main"&gt;    
  &lt;!doctype html&gt; 
  &lt;html&gt; 
  &lt;head&gt;
  &lt;g:layoutHead/&gt;
  &lt;r:layoutResources /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div&gt;some main tabs here &lt;/div&gt; 
  &lt;g:layoutBody/&gt;
  &lt;/body&gt;
  &lt;script type="text/javascript"&gt;
  //script to manipulate main tabs    
  &lt;/script&gt;
  &lt;r:layoutResources /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  &lt;/g:applyLayout&gt;
  </code></pre>
  
  <p>reportTabPanel.gsp:</p>
  
  <pre><code>&lt;g:applyLayout name="mainTabPanel"&gt;    
  &lt;!doctype html&gt; 
  &lt;html&gt; 
  &lt;head&gt;
  &lt;g:layoutHead/&gt;
  &lt;r:layoutResources /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div&gt;some reports tab panel &lt;/div&gt;  
  &lt;g:layoutBody/&gt;
  &lt;/body&gt;
  &lt;script type="text/javascript"&gt;
  //some script to manipulate report tab item
  &lt;/script&gt;
  &lt;r:layoutResources /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  &lt;/g:applyLayout&gt;
  </code></pre>
  
  <p>and now im using in moneyreport.gsp header the following line:</p>
  
  <pre><code>&lt;meta name="layout" content="reportTabPanel" /&gt;
  </code></pre>
  
  <p>what i want to see is the nice header and the maintabsPanel and the reportTabPanel but all i see is the body of moneyreport.gsp</p>
  
  <p>the weird thing is that if i use this: </p>
  
  <pre><code>&lt;meta name="layout" content="mainTabPanel" /&gt;
  </code></pre>
  
  <p>inside moneyreport.gsp i see mainTab and the body of moneyreport.gsp as expected.</p>
  
  <p>what am i doing wrong? i cannot use 3 layout on the same page?</p>
  
  <p>thanks for your help guys ...</p>