<s:radio label="用户类型" name ="type" list= "{'学生','管理员','游客'}"/>
里面的值有三个,我在后台的action里面获取不到单选框的值吗? 例如我这么做:
Java code
public class LoginAction extends BaseAction
{
private String type;
……………………
//省略无关变量的setter
public String getType()
{
return type;
}
public void setType(String type)
{
this.type = type;
}
然后就会报错: 严重: Servlet.service() for servlet jsp threw exception tag 'radio', field 'list', name 'type': The requested list key '{'学生','管理员''}' could not be resolved as a collection/array/map/enumeration/iterator type[color=#FF0000][/color]. Example: people or people.{name} - [unknown location]