【发布时间】:2011-11-01 07:51:56
【问题描述】:
在 JSF facelet 页面 (.xhtml) 我有这个 javascript 代码
<script type="text/javascript">
function navigateToDetail() {
var id = document.getElementById("idElemento").value;
alert(id);
var isPratica = document.getElementById("isPratica").value;
alert(isPratica);
var box = "#{boxCtrl.idBox}";
alert(box);
if (isPratica==true)
window.location = "DettaglioRichiesta.xhtml?id=" + id + "&box=" + box;
else
window.location = "../Richieste/DettaglioRichiesta.xhtml?id=" + id + "&box=" + box;
}
</script>
它不起作用,因为 jfs 引擎认为“&box”是相对于绑定的,它说:
Error Parsing /Box/ListaRichieste.xhtml: Error Traced[line: 20] The reference to entity "box" must end with the ';' delimiter
我可以避免这种行为吗?
【问题讨论】:
标签: javascript jsf facelets