dreampolice
Technical User
How do I keep Radio button values and not lose them after a Form is submitted? I have no problem keeping text values where a form is submitted and if there is a validation issue with the text value it takes me back to the Form and shows the Form text value that was submitted. With Radio buttons it clears the Form Radio selection.
JavaBean:
Form in JSP:
Please advise.
JavaBean:
Code:
public void setNotify(String n) {
notify=n;
}
public String getNotify() {
return notify;
}
Form in JSP:
Code:
<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" /> >
Please advise.