Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
DefaultResourceHandler conflicts with PrimeFaces resource handler #97
My application (Omnifaces2.0+PrimeFaces5.1+PrimeFacesExtensions3.0) gets the following ResourceHandler chain during system startup:
GraphicResourceHandler -> PrimeFacesExtensionsResourceHandler -> PrimeResourceHandler
Issue - Primefaces version number is no longer appended to PrimeFaces resources; i.e. URL's used to be:
now they are:
PrimeFacesExtensionsResourceHandler has overridden only 3 argument version of createResource(); PrimeResourceHandler has overriden ONLY 2 argument version of createResource().
Main issue: if JSF calls 2 argument version of createResource(), only 2 argument version must be called by all wrappers in the chain. DefaultResourceHandler breaks this (in case of Primefaces resources calls 3 argument version).
Originally, in previous OmniFaces versions, the combined, CDN and unmapped resource handler implementations had only 2-argument
The JSF spec is unfortunately not clear in this, but technically, the PrimeFaces resource handlers are broken. They should also have implemented all 3
The problem here is indeed that the
In an ideal world, everyone should be overriding all 3
In any case, technically you're right, it only unfortunately won't result in safe and DRY code. I'll brainstorm about fixing this peculiar problem from OmniFaces side on.