На странице фейслета JSF нет строки javascript с символом '&' символ

на странице фейслета JSF (.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

Я могу я избежать такого поведения?

5
задан BalusC 22 August 2011 в 17:07
поделиться