Title: Now Look with radio-Buttons when iterating

Hi Ralph

I tried ...

<html:radio  property="auswahl" value="<%= adresse.getName() %>" />

and got ...

A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 49 in the jsp file: /logon.jsp

Generated servlet error:
C:\tomcat4.0\work\localhost\radio\_0002flogon_jsp.java:297: Method getName() not found in class java.lang.Object.
                              _jspx_th_html_radio_0.setValue( adresse.getName() );
                                                                             ^
1 error


Also I tried ...
    <html:radio  property="auswahl" value="<bean:write name="adresse" property="name"/>" />

and got...

org.apache.jasper.compiler.ParseException: /logon.jsp(49,66) Attribute adresse has no value


Any suggestion?

Thanks Beat



--------------


This should do the trick.

    <html:radio  property="auswahl" value="<%= adresse.getName() %>" />

or even

    <html:radio  property="auswahl" value="<bean:write name="adresse"
property="name"/>" />

Greetings Ralph

----- Original Message -----
From: Friedli Beat [UFA AG Her]
To: '[EMAIL PROTECTED]'
Sent: Thursday, August 30, 2001 11:25 AM
Subject: How to use radio-Buttons when iterating


How can I tell the radio-button to take the value from the collection I'm
iterating throug?
<%--I'm iterating thrugh the collection adressen --%>
<logic:iterate name="radio" property="adressen" id="adresse" >

        <%--Im trying to create a radiobutton for each "name" in
"adress"--%>
         <html:radio  property="auswahl" value="Here should stand the name"
/>

</logic:iterate>


Thanks,
Beat Friedli

Reply via email to