i'm using Omnifaces (GREAT LIBRARY) in my project.
It's a jsf 2 project with primefaces 4 library, running on JBoss 7.2.
I've used the <p:graphicImage /> for loading an image from db.
I've found the code on internet and it's working correctly.
The problem comes when i activated the UnmappedResourceHandler of omnifaces on my project.
After activate, the handler is working ok, i can access to (other) image inside my resources by name from css.
But this handler active, the loading of the image in the <p:graphicImage /> isn't working anymore.
Debugging the code, i can only see 1 request for the content (without unmappedresourcehandler the request are 2).
Is there any workaround?
Thanks!
The problem has been fixed. The
UnmappedResourceHandlerincorrectly expected thatResourceHandler#createResource()would returnnullon those kind of resources, so that it could delegate the call to the wrapped resource handler. However, it didn't returnnulland ultimately an empty resource body was written to the response.It's fixed by checking if the request parameter
lnequals "primefaces" and if the request parameterpfdridis notnull. TheUnmappedResourceHandlerwill then delegate the call to the wrapped resource handler, which would be thePrimeResourceHandler.The changes are visible in commit 8abfb8a and are available as per today's 1.8 snapshot.