0
後,我加入F:AJAX標籤,以我的網頁之一,tomcat的自動插入jsf.js腳本爲標題:的MyFaces + AJAX + IE - 在頁面加載問題
<script type="text/javascript" src="<app-name>/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development">
它開始引起一些奇怪的錯誤IE在頁面加載。最讓人驚訝的是,每次頁面重新加載時,它們發生的錯誤和地點的數量可能會有所不同,有時甚至是顯着的。我應該提到,在Chrome中,所有加載都沒有任何問題?
SCRIPT5007: Unable to get value of the property '_mfClazz': object is null or undefined
jsf.js.jsf?ln=javax.faces&stage=Development, line 734 character 13
SCRIPT5009: '_MF_OBJECT' is undefined
_HtmlStripper.js.jsf?ln=org.apache.myfaces.core.impl.util, line 28 character 1
SCRIPT5009: '_MF_OBJECT' is undefined
_AjaxUtils.js.jsf?ln=org.apache.myfaces.core.impl.xhrCore, line 27 character 1
SCRIPT5007: Unable to get value of the property 'engine': object is null or undefined
Xhr1.js.jsf?ln=org.apache.myfaces.core.impl.xhrCore, line 29 character 1
SCRIPT5009: '_MF_OBJECT' is undefined
_Queue.js.jsf?ln=org.apache.myfaces.core.impl.util, line 25 character 1
SCRIPT5007: Unable to get value of the property '_mfClazz': object is null or undefined
jsf.js.jsf?ln=javax.faces&stage=Development, line 720 character 15
SCRIPT5007: Unable to get value of the property '_mfClazz': object is null or undefined
jsf.js.jsf?ln=javax.faces&stage=Development, line 720 character 15
SCRIPT5007: Unable to get value of the property 'engine': object is null or undefined
IFrame.js.jsf?ln=org.apache.myfaces.core.impl.xhrCore, line 27 character 1
SCRIPT5009: '_MF_OBJECT' is undefined
_AjaxRequest.js.jsf?ln=org.apache.myfaces.core.impl.xhrCore, line 32 character 1
SCRIPT5009: '_MF_OBJECT' is undefined
_AjaxResponse.js.jsf?ln=org.apache.myfaces.core.impl.xhrCore, line 32 character 1
感謝您的答覆。我正在使用最新版本的myfaces(2.1.8);我很確定沒有嵌套窗體。此外,這些錯誤發生在初始JS加載時,加載文檔之前。我會嘗試一些簡單的頁面,看看它是否會有所幫助。 – AndreiM
b.t.w如果您將'web.xml'中的PROJECT_STAGE模式從'Development'更改爲'Production',是否解決了這些問題? – Daniel
是的,它確實解決了問題!錯誤消失了......我應該永久切換到生產模式嗎?那應該是什麼區別? – AndreiM