Keeping Radio selection in JSP Form
- From: "teser3@xxxxxxxxxxx" <teser3@xxxxxxxxxxx>
- Date: Tue, 30 Oct 2007 16:25:10 -0700
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 Radio selection.
Please advise.
JavaBean:
public void setNotify(String n) {
notify=n;
}
public String getNotify() {
return notify;
}
Form in JSP:
<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" /> >
.
- Follow-Ups:
- Re: Keeping Radio selection in JSP Form
- From: Lew
- Re: Keeping Radio selection in JSP Form
- Prev by Date: Re: jsp client for axis2 webservice
- Next by Date: Re: File Open dialog bug in 1.6.0_03
- Previous by thread: Important and Urgent
- Next by thread: Re: Keeping Radio selection in JSP Form
- Index(es):