Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/11/2009, 15:08
gspablo
 
Fecha de Ingreso: octubre-2009
Mensajes: 223
Antigüedad: 15 años, 6 meses
Puntos: 2
etiqueta select

Buenas quiero usar una etiqueta select con struts 2, no encuentro mucha información de como se hace o algún ejemplo (que me funcione)

Mi pregunta es: ¿Hay que hacer algo mas que un action.java y un resultado.html? tocar algun xml? uso hibernate y struts 2

He intentado este ejemplo

archivo java

importando list,arraylist y actionsuppor

public class Accion extends ActionSupport {
private List<String> lenguajes;

public List<String> getLenguajes() {
return lenguajes;
}

public String execute() {
lenguajes = new ArrayList<String>();
lenguajes.add("Python");
return SUCCESS;
}
}

archivo jsp

<s:form action="Otro">
<s:select label="Lenguaje preferido" list="lenguajes" />
<s:submit value="Enviar" />
</s:form>

pero me da este fallo
org(punto)apache(punto)jasper(punto)JasperExceptio n: tag 'select', field 'list': The requested list key 'lenguajes' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]

....

Gracias