Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is not possible with <code>&lt;h:outputScript&gt;</code> and <code>&lt;h:outputStylesheet&gt;</code> yet, as they can only point to webapp's own resources, not to an external URL. This feature has already been requested to the JSF guys. See also <a href="http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-598" rel="nofollow">JSF spec issue 598</a>. Right now it's scheduled for 2.2, but I don't expect it to be already implemented then as it's currently at 0 votes.</p> <p>Until then, you'd need to specify them yourself using plain HTML <code>&lt;link&gt;</code> and <code>&lt;script&gt;</code> in <code>&lt;h:head&gt;</code>. You could make it a template definition if necessary, surely when you'd like to define them on a per-view basis.</p> <pre><code>&lt;h:head&gt; ... &lt;ui:insert name="resources" /&gt; &lt;/h:head&gt; </code></pre> <p>and</p> <pre><code>&lt;ui:define name="resources"&gt; &lt;link rel="stylesheet" type="text/css" src="http://.../foo.css" /&gt; &lt;script type="text/javascript" src="http://.../foo.js"&gt;&lt;/script&gt; &lt;/ui:define&gt; </code></pre> <hr> <p><strong>Update</strong> the JSF utility library <a href="http://omnifaces.org" rel="nofollow">OmniFaces</a> has since version 1.2 a <a href="http://omnifaces.org/docs/javadoc/current/org/omnifaces/resourcehandler/CDNResourceHandler.html" rel="nofollow"><code>CDNResourceHandler</code></a> available which could be used to automatically replace JSF resources by CDN resources when running in production stage. See also <a href="http://showcase.omnifaces.org/resourcehandlers/CDNResourceHandler" rel="nofollow">the <code>CDNResourceHandler</code> showcase page</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload