<form-property name="choices" type="com.company.Choices" />
com.company.Choices.java
public class Choices {
private
String var_choices[] = {"1","2","3","4"};
public String[] getChoices() {
return choices;
}
public void setChoices( String [] choices) {
this.choices = choices;
}
}
inside my
jsp <%
Choices objChoices = new Choices ()
String choices [] = (String [])objChoices .getChoices();
%>
<tr>
<td>Rating Criterai 1</td>
<%for(int i = 0; i < choices.length; i++ ) { %>
<td>
<html:radio property="choices" value="<%=choices[i]%>" /></td>
<%} %>
</tr>
<tr>
<td>Rating Criterai 2</td>
<%for(int i = 0; i < choices.length; i++ ) { %>
<td>
<html:radio property="choices" value="<%=choices[i]%>" /></td>
<%} %>
</tr>
I get the radiobuttons but I want only one radio to be selected for each row . How do I dynamically change the property value. I am really confused.
PLs help
Excellent Good Fair Poor
RatingCriteria1
RatingCriteria2