当我添加一个 p:selectBooleanButton到我的PrimeFaces Mobile页面,然后我在服务器日志中收到以下警告 WARNING: JSF1064: Unable to find or serve resource, undefined/undefined.css, from library, primefaces.Jan 11, 2015 3
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
和浏览器控制台中的以下错误:
404 (Not Found)
http://localhost:8080/ewpmob/javax.faces.resource/undefined/undefined.js.xhtml?ln=primefaces&v=5.1.7
这是怎么造成的,我该如何解决?
这是PrimeFaces移动版中的一个错误.这在以下相关答案中被发现并充实: Why is my p:progressBar not displayed, only the number?解决方法是,在head或head的开头执行此脚本,内联或通过自定义脚本文件:
var originalPrimeFacesCw = PrimeFaces.cw; PrimeFaces.cw = function(name, id, options, resource) { resource = resource || name.toLowerCase(); originalPrimeFacesCw.apply(this, [name, id, options, resource]); };