Suppose: an html form has an array of similar fields, and on posting we
want to send their parameter values to a bean using <jsp:setProperty
name="fieldArrayBean" property="*" /> (with little or no code added).
Case 1: Let's say the form fields are named "field0", "field1", ... Then
"public void setField0(String input)", "public void setField1(String
input)", ... could be used even if not the most elegant.
Case 2: Let's say the form fields are named "field[0]", "field[1]", ...
What would the declaration be for the set-parameter method in the bean?
"public void setField(int field, String input)" is the closest I could
guess, but it doesn't seem to work.
Anybody solved this one?
Steve Dz.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets