Hi Friends,
I have a table in a JSP which has three columns
1) Radio Button
2) Project ID
3) Project Description
The code rendering the table is as follows:
<div style="overflow:auto; width:400px; height: 200px;">
<dmf:table border="1" cellpadding="0" cellspacing="0" width="100%" bgcolor="#FFFFFF" >
<%
for ( int i = 0; i < DummyComponent.ptSummary.length; i++ ) {
%>
<TR>
<% if(DummyComponent.ptSummary[i].getID()!= "") {%>
<TD><dmf:radio id = '<%=DummyComponent.ptSummary[i].getID() %>' name = '<%=DummyComponent.ptSummary[i].getID() %>' group = 'radioForProject' onclick = 'onRadioSelected' value="true" /></TD>
<TD><%=DummyComponent.ptSummary[i].getID() %></TD>
<TD><%=DummyComponent.ptSummary[i].getDescription() %></TD>
<%} %>
</TR>
<%
}
%></dmf:table>
</div>
Now i have set the value of the radio button as true (scroll to the extreme right above to see code). But as a result, the bottom most or last entity in the loop gets the true value set. Since the height of the table is 200 px, only the first 10 entries are seen at a time and the lower entries seen after scrolling down and here lies my problem. As the lower most entry gets the radio button set, the user might never know if any radio button is set true by default, since he is most unlikely to scroll all the way down to the bottom to check if any entry is set true by default using radio button check.
I need to set the top most entry to be true.
Would really appreciate your help to achieve this target
Thanks & Regards
Vishnu Soman