Newbie to struts/jstl : Radio button with JSTL
843836Jul 8 2005 — edited Jul 8 2005I have the following code where dList is an Arraylist. I can display the contents of the list on the table, but cannot get any of the radiobutton selected on the page. selectedId is an int in my form which specifies which row is selected
<%int innerIndex=0; %>
<c:forEach varStatus="localStatus" var="resultRow" items="${dList}">
<tr>
<td><input type="radio" name="selectedId" value="<%= innerIndex %>"
<c:if test="${selectedId=='<%=innerIndex%>'}">checked="checked"</c:if> onclick="javascript:submit();"/> </td>
</tr>
<% innerIndex++ ; %>
</c:forEach>
Second Part : on selection of a radiobutton i have to display some data from the row on some textfield on my page. I am using javascript:submit, is there any other way i can do it ?
Thanks in advn.
Raj