title: When using <ui:composition> templating, where should I declare the <f:metadata>?
body: <p>I have made a lot of progress in converting my JSF applications to book-markable pages, but I am wondering if I am doing it the right way.  One question is that is there a best-practice location for the <strong>f:metadata</strong> tags?</p>
  
  <p>My typical Facelets client page looks like this:</p>
  
  <pre><code>    &lt;ui:composition template="./pattern.xhtml"&gt;
  
          &lt;ui:define name="content"&gt;
  
              &lt;f:metadata&gt;
                  &lt;f:viewParam name="userId" value="#{bean.userId}" /&gt;
                  &lt;f:viewParam name="startRecord" value="#{bean.startRecord}" /&gt;
                  &lt;f:viewParam name="pageSize" value="#{bean.pageSize}" /&gt;
                  &lt;f:viewParam name="sort" value="#{bean.sort}" /&gt;
              &lt;/f:metadata&gt;
  
              &lt;h1&gt;Data Table&lt;/h1&gt;
  
  etc
  </code></pre>
  
  <p>So the <strong>f:metadata</strong> and child <strong>f:viewParam</strong> tags are encountered in the body of my page.  My <strong>pattern.xhtml</strong> template also has a section (named "header") that could put these tags in the header section.  Should they be put there?   Does it make a difference or am I set up for some side effect I haven't seen yet?</p>