title: JSF h:outputScript ordering and PrimeFaces jQuery
body: <p>I want to use (<a href="https://stackoverflow.com/questions/10205318">Primefaces with TwitterBootstrap</a>). Currently the DropDown menu it's not working if e.g. a <code>p:dataTable</code> is present. I've figured out, that it's working (without any Primefaces components) if I have the following ordering in <code>h:head</code>:</p>
  
  <pre><code>&lt;h:head&gt;
    &lt;h:outputScript library="js" name="bootstrap.js"/&gt;
    &lt;h:outputScript library="primefaces" name="jquery/jquery.js"/&gt;
    ...
  &lt;/h:head&gt;
  </code></pre>
  
  <p>If I swap the ordering (first jquery.js, than bootstrap.js), the DropDown menu is broken. My problem is, that with the usage of PrimeFaces components in the rendered HTML output the scripts used by PrimeFaces (jquery.js and primefaces.js) are always before manual entries in <code>h:head</code>.</p>
  
  <pre><code>&lt;script src="/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces"&gt;&lt;/script&gt;
  &lt;script src="/javax.faces.resource/primefaces.js.jsf?ln=primefaces"&gt;&lt;/script&gt;
  &lt;script src="/javax.faces.resource/bootstrap.js.jsf?ln=js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>How can I import <code>bootstrap.js</code> before <code>jquery.js</code>?</p>