Hi,

    The problem is that I have a dynamically generated table . There can be
any number of rows and each value is associated with a radio button group of
two buttons . So I am generating the name  like "radio0", "radio1", "radio2"
etc.
    Is there any way to pass an array of boolean values based on the radio
button checked property to the JSP page ?
bye,
Mohan

Original message

-----I use the setProperty directive, like:

-----  <jsp:setProperty name="pizza" property="*"/>

-----in conjunction with the name in the RADIO input type:

----- <% for(i=0; i<pizza.getOptionCount(); i++) { %>
----- <INPUT TYPE=radio NAME=product
-----  <%= ((i==0) ? "CHECKED" : "") %>
-----  VALUE=<%= "\"" + pizza.getToppingName(i) + "\"" %>
----- >
----- <%= pizza.getToppingName(i) %>
----- <% } %>

>When the JSP page is reloaded (I use the same JSP to generate display,
order
>and collection HTML code) there is a "product" property with a value of
>something like "pepperoni". One of the first things that gets executed is
>the setProperty directive. This directive causes the bean associated with
>the pizza variable to get inspected to look for a setProduct method as well
>as a product attribute and a getProduct method. If found, the setProduct
>method is executed with the VALUE part passed as a parameter. Since you
will
>have several radio input types you will need to have them named differently
>and have each associated with a different set/get/attribute name in your
>bean.
bye,
Mohan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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

Reply via email to