我正在整合在线白板项目,这里可以找到源 代码。它最初是为 primefaces 2.2.1 版编写的,但我们希望与使用最新 primefaces 3.4 版的主应用程序集成。更改为最新版本后,我们收到很多 javascript 错误,其中很少粘贴在下面。如果我们必须从 primefaces 的 2.2.1 版本升级到 3.4,我们需要寻找什么?
错误
Uncaught TypeError: Object [object Object] has no method 'dialog' whiteboard.js.jsf:67
Uncaught ReferenceError: whiteboardDesigner is not defined :8080/emyed-whiteboard/whiteboard/workplace/fc4b4afe-f96f-442b-a0d0-bb29a46836dc/9fb61421-8c0f-4cbb-b0f7-96dc5e31bd56/:73
Resource interpreted as Image but transferred with MIME type text/css: "http://localhost:8080/emyed-whiteboard/javax.faces.resource/whiteboard.css.jsf?ln=css". jquery.js.jsf:14
Uncaught ReferenceError: whiteboardDesigner is not defined :8080/emyed-whiteboard/whiteboard/workplace/fc4b4afe-f96f-442b-a0d0-bb29a46836dc/9fb61421-8c0f-4cbb-b0f7-96dc5e31bd56/:82
根据上述错误,未定义 whiteboardDesigner。但它已经在其中一个 javascript 中定义。
出现错误的 HTML 页面
<button type="button" title="Draw Free Line" onclick="whiteboardDesigner.switchToMode('freeLineMode', 'pointer')" class="toolboxItem ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary" value="Draw Free Line">
Uncaught ReferenceError: whiteboardDesigner is not defined
Javascript
// create a global whiteboard designer instance
whiteboardDesigner = new WhiteboardDesigner(new WhiteboardConfig(), whiteboardId, user, pubSubUrl, pubSubTransport);