I have a class ManXML
that has a method that returns an array of strings String[] : getArrayTemas()
. I want to use that output as a variable in the script of my jsp.
<script>
$(document).ready(function() {
BindControls();
});
function BindControls() {
const BD = new ManXML("BaseDados");
var Temas = BD.getArrayTemas();
$('#tbTemas').autocomplete({
source : Temas,
minLength : 0,
scroll : true
}).focus(function() {
$(this).autocomplete("search", "");
});
}
</script>