Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Newbie to struts/jstl : Radio button with JSTL

843836Jul 8 2005 — edited Jul 8 2005
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2005
Added on Jul 8 2005
4 comments
373 views