what is the argument type of retrieving list box values from bean?
In jsp page, I am including the bean in application scope
<% jsp:usebean id = abc class = userdata scope = application />
<% jsp:setProperty name = abc property = "*" />
List of users : <select name="userslist" size='5' MULTIPLE>
<option value = "first" > first </option>
<option value = "second" > second </option>
<option value = "third" > third </option>
<option value = "fourth" > fourth </option>
</select>
<% ArrayList al = user.getUsersList();%>
Selected Users :<% if(al != null) {
int k = al.size();
for(int i = 0; i < k ; i++){
%>
<br> <%= al.get(i) %>
<% }
} %>
<INPUT TYPE=TEXT NAME=username SIZE=20 value = <%= user.getUsername()%>><BR>
Here, in userdata
we have all our set and get methods corresponding to each form element.
public void setUsername(String value)
{ name = value; }
public void getUsername(String value)
{ return name; }
Similarly what is the argument type of retrieving the selected values of <select>,<option> values in bean.
public void setuserslist(argumenttype unknown)
???????????????
Discussions
Web tier: servlets, JSP, Web frameworks: what is the argument type of retrieving list box values from bea
-
what is the argument type of retrieving list box values from bea (0 messages)
- Posted by: U V
- Posted on: May 30 2001 19:53 EDT