with or wihtout EJB's ??
if with:
<tr>
<td class="normaltext" width="122" height="32">
<div align="center">
<%
Collection col = ButtonHome.findButtons(...);
for (Iterator it = col.iterator(); it.hasNext(); )
{
Button tbut = (Button) it.next();
%><input type="radio" name="Course001" value="<%= tbut.getValue() %>">
<span class="newslist">N</span>
<%
}
%>
</td>
</tr>
if without, you'll have to iterate a recordset instead of a collection
HTH
JP
-----Original Message-----
From: Kemp Randy-W18971 [mailto:[EMAIL PROTECTED]]
Sent: Viernes, 15 de Diciembre de 2000 13:24
To: Orion-Interest
Subject: setting radio buttons in JSP with database values
This is probably a simple question, but I can't find the answer. I am
developing some JSP forms mapping values to a CMP bean and RDMS database.
My boss wants to change some text fields in the JSP pages for adding and
updating to radio buttons. I can easily set the value with code like this
on initial adding:
<tr>
<td class="normaltext" width="122" height="32">
<div align="center">
<input type="radio" name="Course001" value="No">
<span class="newslist">N</span>
<input type="radio" name="Course001" value="Basic">
<span class="newslist">B</span>
<input type="radio" name="Course001" value="Advanced">
<span class="newslist">A</span></div>
</td>
When I get to the update part, I am not sure how to set the radio button to
a database value. Can someone share a code example in the TD element for
setting the radio button with a value from a database or point me to a web
site? I can't find any in my JSP books.