Well if you use a java.util.List in the list attribute of the select tag, then the listKey and listValue both point to the values in the list. If the elements in the list are complex objects like for example a User class object with properties name and id, then you can set the listKey and listValue attributes to point to then like for example - listKey="id" listValue="name".
If you don't want that, then you must use a java.util.Map so that the listKey points to the keys in the map and listValue points to the values in the map...
Try adding javabean methods into AnsCategory class
Also why are you using this syntax
This means that you are trying to access an attribute from the ActionContext. The listKey and listValue are string properties. Use this
Joined: Apr 12, 2007
Thaks a lot . That worked fine.
But i still have some doubt in that concept. When we create a object. The values are assigned to the appropriate variables. when i am creating other with other the list hold object of diffrent values in each position. So why we need to use the bean property getter and settter since it will also do the same one.