Iterator itUf = listaUf.iterator();
StringBuilder javaScript = new StringBuilder("function getUf()\n{\n");
javaScript.append("\tconteudo = \"\";\n");
while (itUf.hasNext())
{
Uf uf = (Uf)itUf.next();
javaScript.append("\tconteudo += \"\\t\\t\\t\\t<option value = \\\"")
.append(uf.getCodUf().toString()).append("\\\">")
.append(uf.getDescricaoUf()).append("\";\n")
.append("\tconteudo += \"</option>\\n\"\n");
}
javaScript.append("\treturn(conteudo);\n}");
return javaScript.toString();
}