Hi,

I have been trying use Struts 2 tag: select and combobox. But when I
pass as a List parameter name of List i get a error like that:

Caused by: tag 'select', field 'list', name 'fruits': The requested
list key 'fruits' could not be r
esolved as a collection/array/map/enumeration/iterator type. Example:
people or people.{name} - [unk
nown location]

My code looks like that in jsp file:

<s:select label="Fruits Name" name="fruits"     headerValue="---
Please Select ---"  headerKey="1" list="fruits" />

Where fruits is List  in appropriate acction class :

private java.util.List<String> fruits;

  public java.util.List<String> getFruits(){
     fruits = new java.util.ArrayList<String>();
    fruits.add("Apple");
    fruits.add("Orange");
    fruits.add("Mango");
    fruits.add("Appppple");

    return this.fruits;
  }

Anybody solve this problem ?

I use a struts2.0.14



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to