我没有对此数据库进行任何更改,突然之间,在加载各种 Xpages 时出现 (500) 错误。在这一点上,当我在数据库属性的 xpages 选项卡上切换到“显示 Xpage 运行时错误”时,它会在 web.xml 下显示错误。
如果我删除包含此客户端代码的按钮(之前它可以完美地验证编辑框),错误只会移动到页面上的下一段 JavaScript 并给出类似的错误。
我试过“清洁”项目。我尝试使用服务器 ID 对整个数据库进行签名。
任何帮助将非常感激!
The runtime has encountered an unexpected error.
Error source
Page Name:/msr.xsp
Control Id: _id20
Exception
Error while executing JavaScript computed expression
Script interpreter error, line=3, col=8: [ReferenceError] 'XSP' not found
------按钮控制:
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xp:actionGroup>
<xp:actionGroup>
<xp:modifyField
name="Status">
<xp:this.value><![CDATA[#{javascript:if (document1.isNewNote()) {
"Submitted to Project Officer";
}
else if (document1.Status == "Submitted to Project Officer"){
"Submitted to Supervisor";
}
else{
"Completed";
}}]]></xp:this.value>
</xp:modifyField>
<xp:saveDocument
var="document1">
</xp:saveDocument>
<xp:changeDocumentMode
mode="readOnly" var="document1">
</xp:changeDocumentMode>
</xp:actionGroup>
</xp:actionGroup>
</xp:this.action>
<xp:this.script>
<xp:executeClientScript>
<xp:this.script><![CDATA[#{javascript:
if(XSP.getElementById("#{id:ProjectTitle}").value == ""){
XSP.getElementById("#{id:ProjectTitle}").focus();
XSP.getElementById("#{id:ProjectTitle}").style.backgroundColor = "pink";
alert("Please enter a Project Title.");
return false;
}
else{
XSP.getElementById("#{id:ProjectTitle}").style.backgroundColor = "#ffe";
}
///NOT sole source
if(XSP.getElementById("#{id:RT}").innerHTML == "MSR"){
if(XSP.getElementById("#{id:SoleSource}").checked == false){
if(XSP.getElementById("#{id:SS_Name1}").value == ""){
XSP.getElementById("#{id:SS_Name1}").focus();
XSP.getElementById("#{id:SS_Name1}").style.backgroundColor = "pink";
alert("Please fill in the Name of Suggested Source 1.");
return false;
}
else{
XSP.getElementById("#{id:SS_Name1}").style.backgroundColor = "#ffe";
}
}
}
}]]></xp:this.script>
</xp:executeClientScript>
</xp:this.script></xp:eventHandler>
</xp:button>