tagLib com jQuery

0 respostas
Fmgasparino

Olá pessoal,

Estou com o prooblema na aplicação, pois preciso criar uma div dinamicamente.

Como o conteudo é grande, criei uma taglib. Mas não esta funcionando.

Da erro nos espaços, ja coloquei tudo em String mas continua dando erro, sabem o que pode ser?

Valeu
<%@ attribute name="name" required="true" %>
<h2 class='trigger'> 
<a href='#'>${name}</a> 
</h2> 
<div class='toggle_container'>
	<div class='block'> 
		<form class='servico'> 
			<table> 
				<tr> 
					<td colspan='4'> 
						<button id='salvarServico'> 
							Salvar 
						</button> 
						<button id='removerServico'> 
							Remover 
						</button> 
					</td> 
				</tr> 
				<tr> 
					<td> 
						<label> 
							Data Realizada: 
						</label> 
					</td> 
					<td> 
						<util:campoData name='tratamento.dataRealizada' id='dataRealizada'></util:campoData> 
					</td> 
				</tr> 
				<tr> 
					<td> 
						<label> 	
							Dente: 
						</label> 
					</td> 
					<td> 
						<util:campoDente name='servico.dente' id='dente'></util:campoDente> 
					</td> 
				</tr> 
				<tr> 
					<td> 
						<label> 
							Procedimento: 
						</label> 
					</td> 
					<td> 
						<select name='procedimento.id' id='procedimento'> 
							<c:forEach var='procedimento' items='${procedimentoList}'> 
								<option value='${procedimento.id}'> 
									${procedimento.nome} 
								</option> 
							</c:forEach> 
						</select> 
					</td> 
				</tr> 
				<tr> 
					<td> 
						<label> 
							Status 
						</label> 
					</td> 
					<td> 
						<div class='radio'> 
							<input type='radio' id='statusRealizado' name='servico.status' 
								value='masculino'> 
							<label for='statusRealizado'> 
								Realizado 
							</label> 
							<input type='radio' name='servico.status' id='statusPendente' 
								value='feminino'> 
							<label for='statusPendente'> 
								Pendente 
							</label> 
						</div> 
					</td> 
				</tr> 
				<tr> 
					<td> 
						<label> 
							Pagamento: 
						</label> 
					</td> 
					<td> 
						<div class='radio'> 
							<input type='radio' id='pagamentoParticular' 
								name='tratamento.pagamento' value='particular'> 
							<label for='pagamentoParticular'> 
								Particular 
							</label> 
							<input type='radio' name='tratamento.pagamento' 
								id='pagamentoConveniado' value='feminino'> 
							<label for='pagamentoConveniado'> 
								Convêniado 
							</label> 
						</div> 
					</td> 
				</tr> 
				<tr> 
					<td> 
						<label> 
							Convenio: 
						</label> 
					</td> 
					<td> 
						<select name='servico.convenio' id='convenio'> 
							<c:forEach var='convenio' items='${convenioList}'> 
								<option value='${convenio.id}'> 
									${convenio.nomeFantasia} 
								</option> 
							</c:forEach> 
						</select> 
					</td> 
				</tr> 
				<tr> 
					<td> 
						<label> 
							Observação: 
						</label> 
					</td> 
					<td> 
						<textarea rows='4' cols='15'></textarea> 
					</td> 
				</tr> 
			</table> 
		</form> 
	</div> 
</div>
Com string:
<%@ attribute name="name" required="true"%>
"<h2 class='trigger'>" +
"<a href='#'>${name}</a>" +
"</h2>" +
"<div class='toggle_container'>"
"	<div class='block'>" +
"		<form class='servico'>" +
"			<table>" +
"				<tr>" +
"					<td colspan='4'>" +
"						<button id='salvarServico'>" +
"							Salvar" +
"						</button>" +
"						<button id='removerServico'>" +
"							Remover" +
"						</button>" +
"						<button>" +
"							Financeiro" +
"						</button>" +
"					</td>" +
"				</tr>" +
"				<tr>" +
"					<td>" +
"						<label>" +
"							Data Realizada:" +
"						</label>" +
"					</td>" +
"					<td>" +
"						<util:campoData name='tratamento.dataRealizada' id='dataRealizada'></util:campoData>" +
"					</td>" +
"				</tr>" +
"				<tr>" +
"					<td>" +
"						<label>" +
"							Dente:" +
"						</label>" +
"					</td>" +
"					<td>" +
"						<util:campoDente name='servico.dente' id='dente'></util:campoDente>" +
"					</td>" +
"				</tr>" +
"				<tr>" +
"					<td>" +
"						<label>" +
"							Procedimento:" +
"						</label>" +
"					</td>" +
"					<td>" +
"						<select name='procedimento.id' id='procedimento'>" +
"							<c:forEach var='procedimento' items='${procedimentoList}'>" +
"								<option value='${procedimento.id}'>" +
"									${procedimento.nome}" +
"								</option>" +
"							</c:forEach>" +
"						</select>" +
"					</td>" +
"				</tr>" +
"				<tr>" +
"					<td>" +
"						<label>" +
"							Status" +
"						</label>" +
"					</td>" +
"					<td>" +
"						<div class='radio'>" +
"							<input type='radio' id='statusRealizado' name='servico.status'" +
"								value='masculino'>" +
"							<label for='statusRealizado'>" +
"								Realizado" +
"							</label>" +
"							<input type='radio' name='servico.status' id='statusPendente'" +
"								value='feminino'>" +
"							<label for='statusPendente'>" +
"								Pendente" +
"							</label>" +
"						</div>" +
"					</td>" +
"				</tr>" +
"				<tr>" +
"					<td>" +
"						<label>" +
"							Pagamento:" +
"						</label>" +
"					</td>" +
"					<td>" +
"						<div class='radio'>" +
"							<input type='radio' id='pagamentoParticular'" +
"								name='tratamento.pagamento' value='particular'>" +
"							<label for='pagamentoParticular'>" +
"								Particular" +
"							</label>" +
"							<input type='radio' name='tratamento.pagamento'" +
"								id='pagamentoConveniado' value='feminino'>" +
"							<label for='pagamentoConveniado'>" +
"								Convêniado" +
"							</label>" +
"						</div>" +
"					</td>" +
"				</tr>" +
"				<tr>" +
"					<td>" +
"						<label>" +
"							Convenio:" +
"						</label>" +
"					</td>" +
"					<td>" +
"						<select name='servico.convenio' id='convenio'>" +
"							<c:forEach var='convenio' items='${convenioList}'>" +
"								<option value='${convenio.id}'>" +
"									${convenio.nomeFantasia}" +
"								</option>" +
"							</c:forEach>" +
"						</select>" +
"					</td>" +
"				</tr>" +
"				<tr>" +
"					<td>" +
"						<label>" +
"							Observação:" +
"						</label>" +
"					</td>" +
"					<td>" +
"						<textarea rows='4' cols='15'></textarea>" +
"					</td>" +
"				</tr>" +
"			</table>" +
"		</form>" +
"	</div>" +
"</div>"
Chamada:
$('#novoServico')
						.click(
								function() {
									$('#servicosContainer').append(<%--<util:divServico2 name='Servico X'></util:divServico2>--%>);
demais chaves...
Criado 1 de novembro de 2010
Respostas 0
Participantes 1