Enviado em 12/08/2016 - 09:40h
Olá pessoal!
Decidir estudar como desenvolver paginas JSP, a partir da apostilia Caelum
só travei na parte de usar a tagfile Campodata.tag
https://www.caelum.com.br/apostila-java-web/tags-customizadas-com-tagfiles/#8-4-exercicios-criando-n...
o arquivo campoData.tag é o seguinte:
E assim eu chamo no adiciona-contato.jsp
Logo quando eu carrego a página, dá o seguinte erro console:
Agradeço antecipadamente
Decidir estudar como desenvolver paginas JSP, a partir da apostilia Caelum
só travei na parte de usar a tagfile Campodata.tag
https://www.caelum.com.br/apostila-java-web/tags-customizadas-com-tagfiles/#8-4-exercicios-criando-n...
o arquivo campoData.tag é o seguinte:
<%@attribute name="id" required="true"%>
<%-- any content can be specified here e.g.: --%>
<script>
$( function() {
$("#{id}").datepicker({dateFormat: 'dd/mm/yy'});
} );
</script>
<input id="${id}" name="${id}" type="text"/>
E assim eu chamo no adiciona-contato.jsp
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib tagdir="/WEB-INF/tags/" prefix="caelum" %>
<html>
<head>
<title>Adiciona contato</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/jquery-ui.css" rel="stylesheet" />
<script src="js/jquery-1.8.2.js"></script>
<script src="js/jquery-ui.js"></script>
</head>
<body>
<c:import url="cabecalho.jsp" />
<form action="adicionaContato" method="POST">
Nome: <input type="text" name="nome" /><br />
E-mail: <input type="text" name="email" /><br />
Endereço: <input type="text" name="endereco" /><br />
Data Nascimento: <caelum:campoData id="dataNascimento" /><br />
<input type="submit" value="Gravar" />
</form>
<c:import url="rodape.jsp" />
</body>
</html>
Logo quando eu carrego a página, dá o seguinte erro console:
Uncaught Error: Syntax error, unrecognized expression: #{id}
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
VM65:62 GET http://nikkomsgchannel/e?001d005f005e005a0034004a006b005300580022002a005f00…35005c004c0044001... rapport_nikko_send_focus_event @ VM65:62rapport_nikko_on_focus @ VM65:72
VM65:49 GET http://nikkomsgchannel/e?001d005f005e005a0034004a006b005300580022002a005f00…4d005100480044006...
Agradeço antecipadamente