struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nathan phillips" <>
Subject RE: Use of Iterator tag
Date Wed, 14 Aug 2002 16:53:03 GMT
Hi Keith,

Thanks for the fast response.  I've since added the type per your 
suggestion.  However, it still complains that the method "iterator" has no 
getter.  When I add "getIterator" to my class it works fine.  There must be 
a way to get this to work without having to use a getter method.

From: "Kamholz, Keith   (corp-staff) USX" <>
Reply-To: "Struts Users Mailing List" <>
To: 'Struts Users Mailing List' <>
Subject: RE: Use of Iterator tag
Date: Wed, 14 Aug 2002 12:41:49 -0400
MIME-Version: 1.0
Received: from [] by (3.2) with ESMTP id 
MHotMailBF23D3A3008840043194C0123183CA0B0; Wed, 14 Aug 2002 09:43:15 -0700
Received: (qmail 26214 invoked by uid 97); 14 Aug 2002 16:43:28 -0000
Received: (qmail 26202 invoked by uid 98); 14 Aug 2002 16:43:27 -0000
>From struts-user-return-43223-nathanpp Wed, 14 Aug 2002 09:44:18 -0700
Mailing-List: contact; run by ezmlm
Precedence: bulk
List-Unsubscribe: <>
List-Subscribe: <>
List-Help: <>
List-Post: <>
List-Id: "Struts Users Mailing List" <>
Delivered-To: mailing list
X-Antivirus: nagoya (v4198 created Apr 24 2002)
Message-ID: <>
X-Mailer: Internet Mail Service (5.5.2653.19)
X-Spam-Rating: 1.6.2 0/1000/N


For your first question, I think you should specify the 'type' attribute of
the iterate tag.  This indicates the type of variable that the collection
contains, and is pretty important (i think).

For the radio button, use a little scriptlet to set the value.  In your case
it would be:
<html:radio property="myId" value="<%= test.getId() %>" />

I think you should get the iterate tag working before you try to make the
radio button work though, cuz the radio button problems could be tied to
your iteration issues.
Does this help you at all?

~ Keith

-----Original Message-----
From: nathan phillips []
Sent: Wednesday, August 14, 2002 12:33 PM
Subject: Use of Iterator tag

Hello all,

I'm new to Struts and attempting to make use of the iterator tag.  I have a
couple questions that I'm hoping some kind individual can help me answer in
regards to the iterator tag.  I have a bean with a method named "iterator"
that returns an iterator.

If I do this it tells me I have no getter for my method iterator, which of
course is true.
<logic:iterate name="testbean" property="iterator" id="test">

So how do I make it work.  I see that there is a collection attribute that
might work but I'm unsure of how exactly to make use of it.  I was thinking
something along the lines of:
<logic:iterate name="testbean" collection=<%=testbean.iterator()%>

Of course that doesn't work though.

My second question is how would do I write out a property for the radio tag
within a iterator tag.  I'm attempting the following with no success.  It
tells me "test" is out of scope however the same bean:write works fine
outside of the radio tag.

<logic:iterate name="testbean" property="iterator" id="test">
   <html:radio property="myId" value="<bean:write name="test"

Any help in solving these mysteries for me would be greatly appreciated.

MSN Photos is the easiest way to share and print your photos:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   
For additional commands, e-mail: 

Join the world’s largest e-mail service with MSN Hotmail.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message