struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph vd Houdt" <ra...@ezcompany.nl>
Subject Re: Now Look with radio-Buttons when iterating
Date Thu, 30 Aug 2001 10:32:57 GMT
Now Look with radio-Buttons when iteratingYou should add the classname of
adresse to the type attribute of the iteration.

<logic:iterate name="radio" property="adressen" id="adresse" type="the fully
classified classname of adresse">
         <html:radio  property="auswahl" value="<%= adresse.getName() %>" />
</logic:iterate>

Good luck

 ----- Original Message -----
From: Friedli Beat [UFA AG Her]
To: 'struts-user@jakarta.apache.org'
Sent: Thursday, August 30, 2001 12:01 PM
Subject: 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: 'struts-user@jakarta.apache.org'
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



Mime
View raw message