Tema: html:select
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/12/2005, 09:45
msi
 
Fecha de Ingreso: marzo-2005
Mensajes: 70
Antigüedad: 19 años, 2 meses
Puntos: 0
Te voy a dar una solución (la que utilizo yo) para hacer lo mismo que tú.

En el Action recupero los valores que quiero que aparezcan en el combo select:

rs = stmt.executeQuery("SELECT * FROM EQUIPOS");
while (rs.next()){
String nombre =rs.getString("EQUIPO");
listaequip.add(new org.apache.struts.util.LabelValueBean(nombre,nombr e));
}

session.setAttribute("listaequip",listaequip);


Y así en la página jsp puedo poner:


<logic:present name="listaequip">
<html:select property="equipo" size="1">
<html:options collection="listaequip" property="value" labelProperty="label" />
</html:select>
</logic:present>

Espero que te sirva.