struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mead Lai" <laiqi...@gmail.com>
Subject How to use <s:select/> Tag? thx
Date Tue, 02 Sep 2008 14:37:43 GMT
the Action has a ModelData:userList

private List <User> userList;
for(int i=0;i<3;i++){
user.setUserId(i+"i"); //userId
user.setEmail(i+"@user.com"); //email
userList.add(user);
}


my tag in jsp is showed following:
<s:select label="test" name="test"list="${userList}" listKey="email"
listValue="userId" required="true"  />

------------------------------------------------------------------------------------------------------------------------------------
but some error caused below:

tag 'select', field 'list', name 'assignEditor': The requested list key
'$userList' could not be resolved as a
collection/array/map/enumeration/iterator
type. Example: people or people.{name} - [unknown location]

javax.servlet.ServletException: tag 'select', field 'list', name
'assignEditor':
The requested list key '$userList' could not be resolved as a
collection/array/map/enumeration/iterator
type. Example: people or people.{name} - [unknown location]
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:518)


Thanks for U answer.
-- 
BestRegards,
Mead
http://yayisoft.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message