PrimeFaces Mobile asks for undefined / undefined.css and undefined / undefined.js causing JSF1064 warning and 404 error
When I add <p:selectBooleanButton>
to PrimeFaces Mobile page I get the following warning in the server log
WARNING: JSF1064: Unable to find or serve resource, undefined/undefined.css, from library, primefaces.
Jan 11, 2015 3:00:36 PM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource
and the following error in the browser console:
404 (not found)
http://localhost:8080/ewpmob/javax.faces.resource/undefined/undefined.js.xhtml?ln=primefaces&v=5.1.7
How is this caused and how can I solve it?
+3
source to share
1 answer
This is a bug in PrimeFaces mobile. This was discovered and formulated in the following response answer: Why is my p: progressBar not showing, just a number?
Workaround: execute this script at the end of the head or at the beginning of the body, both inline and custom script file:
var originalPrimeFacesCw = PrimeFaces.cw;
PrimeFaces.cw = function(name, id, options, resource) {
resource = resource || name.toLowerCase();
originalPrimeFacesCw.apply(this, [name, id, options, resource]);
};
+4
source to share