When using Omnifaces CombineResourceManager and setting the myFaces JSF script target to head
<h:outputScript library="javax.faces" name="jsf.js" target="head" />
Omnifaces catches and combines the script correctly, however, the jsf.js script tag is then inserted a second time at the end of the body.
By removing the target - Omnifaces no longer combines the JS script and the jsf.js file is only inserted once.
Is this a Omnifaces or myFaces issue?
#35 suppress MyFaces re-rendering of resource
Roger. Reproduced and fixed. Try the current 1.8 snapshot and let me know.
Fantastic, it works! thanks
Revert "#35 suppress MyFaces re-rendering of resource"
This reverts commit c7855e8.
Sorry, it broke including "hardcoded" JS resources (on among others zeef.com). I will re-investigate this issue later.
With the snapshot you provided: The following CSS files are not suppressed:
<h:outputStylesheet library="oam.custom.calendar.WH" name="theme.css" />
<h:outputStylesheet library="oam.custom.calendar.DB" name="theme.css" />
And also the auto inserted JS resource:
I committed a fix, also for CSS. Can you please try today's snapshot? https://oss.sonatype.org/content/repositories/snapshots/org/omnifaces/omnifaces/1.8-SNAPSHOT/
CSS files are all combined. Great, thanks!
However, the inputTextHelp files from myfaces is still auto inserted for some reason. What's also strange is that it isn't combined either. Usually both happen when something goes wrong, they are combined and inserted a second time... however, this isn't the case this time.
That may happen if the resource isn't added as a true JSF resource via @ResourceDependency annotation or UIViewRoot#addComponentResource() programmatic call, but is instead "hardcoded" in the renderer. In such case there's nothing what the CombinedResourceHandler can do. Basically, Tomahawk guys need to rewrite their components conform JSF 2.x instead of sticking to old JSF 1.x approach.
Typical 👍 Other than that it works like a dream :) Thanks