title: Using <f:metadata><f:viewParam... correctly within templates
body: <p>On my website I want to be able to change Locale via Link but I cannot use it as I would like. The issue is that I can specify a &lt;<code>f:metadata</code> tag on each page with the following and that works</p>
  
  <pre><code>&lt;ui:define name="metadata"&gt;
   &lt;f:metadata&gt;
          &lt;f:viewParam name="locale" value="#{changeLocaleController.locale}"/&gt;...
  </code></pre>
  
  <p>However that's pretty ugly since this feature has nothing to do with each single page and referes to a control element in the page header and I bet I would miss the element on same page somewhen. So I would like to shift this to my main page template or the header template instead of single pages that define the body element of my page template. My template structure is as below with one main template, one header template, a left open content section (each real page needs to fill this) and a footer template. But if I move this (obviously then <code>&lt;ui:define name="metadata"&gt;</code>) then nothing happens if I click on the link for a reason I don't understand. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE ...&gt;
  &lt;ui:insert name="metadata" /&gt;&lt;
  &lt;h:head&gt;
      some css etc
  &lt;/h:head&gt;
  
  &lt;h:body&gt;
      &lt;ui:insert name="header"&gt;
          &lt;ui:include src="header.xhtml" /&gt;
      &lt;/ui:insert&gt;
  
      &lt;ui:insert name="content" /&gt;
  
      &lt;ui:insert name="footer"&gt;
          &lt;ui:include src="footer.xhtml" /&gt;
      &lt;/ui:insert&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p>So essentially I want to move the above tag piece away from the content section to the overall template or the header section but that doesn't work. Is that possible somehow? </p>
  
  <p>In my header section I have the links to the different languages with </p>
  
  <pre><code>&lt;h:link&gt;
    &lt;f:param name="locale" value="#{language.locale}" /&gt;some image
  &lt;/h:link&gt;
  </code></pre>
  
  <p>Cheers
  Tom</p>