0

Hello, does anyone have an example of radio buttons working with a java bean. It would help out allot. Thank you

1
Contributor
1
Reply
4
Views
6 Years
Discussion Span
Last Post by brynFlew
0

Answer:
JavaBean

public void setNotify(String n) {
    notify=n;
  }
 public String getNotify() {
    return notify;
  }

HtmlForm

jsp:useBean id="formHandler" class="Concord.FormBean" scope="request"/>
 
<form action="process.jsp" method=post>
....
Yes <input type="radio" name="notify" value="Yes" <jsp:getProperty name="formHandler" property="notify" /> >   <br>      
No <input type="radio" name="notify" value="No"  <jsp:getProperty name="formHandler" property="notify" /> >
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.