Popular Combobox com um ArrayList?

2 respostas
R

Pessoal;

Preciso popular meu COMBOBOX com uma ArrayList

<table cellpadding="3" cellspacing="0" border="0">   
    <tr>   
        <td width="150" align="right">Assunto:</td>   
        <td width="665">
	
	<select name="assunto" id="assunto">   
            <%   
                for (String nome : output) {   
            %>   
            <option value="<%=nome%>"> <%=nome%> </option>   
            <%   
                }   
            %>   
        </select></td>   
    </tr>   
</table>

Mas não estou conseguindo!!!
Meu ArrayList recebe um Iterator com 40 itens

Desde Ja! Grato

2 Respostas

R
Roberto Porto:
Pessoal;

Preciso popular meu COMBOBOX com uma ArrayList

output.add(categoria.getTitle()); // inserindo no array


//tentando popular ele
<table cellpadding="3" cellspacing="0" border="0">   
    <tr>   
        <td width="150" align="right">Assunto:</td>   
        <td width="665">
	
	<select name="assunto" id="assunto">   
            <%   
                for (String nome : output) {   
            %>   
            <option value="<%=nome%>"> <%=nome%> </option>   
            <%   
                }   
            %>   
        </select></td>   
    </tr>   
</table>

Mas não estou conseguindo!!!
Meu ArrayList recebe um Iterator com 40 itens

Desde Ja! Grato

C

http://www.guj.com.br/posts/list/114280.java

Criado 7 de janeiro de 2009
Ultima resposta 7 de jan. de 2009
Respostas 2
Participantes 2