4
JSF facelet 페이지 (.xhtml)의
이 javascript 코드가 있습니다.JSF facelet 페이지가 '&'문자가있는 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"가 bindign에 상대적이라고 생각하여 작동하지 않습니다.
Error Parsing /Box/ListaRichieste.xhtml: Error Traced[line: 20] The reference to entity "box" must end with the ';' delimiter
이 동작을 피할 수 있습니까?
감사합니다. 외부 js 파일에 대해 알고 있었지만 "페이지에서"해결하는 것이 궁금했습니다. 솔루션을 주셔서 감사합니다 – themarcuz
당신을 진심으로 환영합니다. – BalusC