My example would have been better if I had the syntax right.
Let me try again.
With a HTML <SELECT> list (or set of checkboxes), what is the easiest way to
collect the <OPTION> values with a <jsp:useBean>?
For example:
<FORM ACTION="/test.jsp" METHOD="POST">
<SELECT MULTIPLE NAME="foo">
<OPTION VALUE="1">One
<OPTION VALUE="2">Two
<OPTION VALUE="3">Three
</SELECT>
...or...
<FORM ACTION="/test.jsp" METHOD="POST">
<INPUT TYPE=CHECKBOX NAME=foo value="1"> One <BR>
<INPUT TYPE=CHECKBOX NAME=foo value="2"> Two <BR>
<INPUT TYPE=CHECKBOX NAME=foo value="3"> Three <BR>
....I select all three options and submit to a JSP which has the
following:
--------
<jsp:useBean id="foo" class="com.FooBean" />
<jsp:setProperty name="foo" property="*" />
The value of foo is: <%= foo.getFoo() %>.
---------
If my foo Bean has a method...
public void setFoo(String value);
.... it will receive the string "1,2,3".
That's sort of OK, but it's a bit dull having to parse out the
values >(and what if my <OPTION>s have commas in the values?)
So...Is there some easier way to collect <OPTION> values with a bean?
Thanks
Richard
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".