In your iterate tag, name should be the name of the form bean, and
property should be the name of the form variable that contains the list.
You also probably need the type attribute to specify what type of
objects the list contains.

In the code you provided it's looking for a form bean called
"clientList" that contains a collection called "clients".

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-----Original Message-----
From: Jay Milam [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 26, 2002 9:53 AM
To: [EMAIL PROTECTED]
Subject: iterate tag to repeat for a collection of individula objects




I need to have a struts logic:iterate tag, which has to repeat a set of
tag
for a collection of individual objects.

I have a .jsp page , which contains Logic iterate tag

          <logic:iterate id="client" name="clientList"
property="clients" >
                  <bean:write name="client" property="clientType"  />
                  <bean:write name="client" property="dateOfBirth"  />
          </logic:iterate>

Where 'clientList' is a bean which contain 'clients'(ArrayList) as
member.

The form bean for this .jsp contains 'clientList' as a member.

In the action class  the following step are done
for i=1 to x
1. Create new Client object. ( Where Client object contains,
'clientType' 
and 'dateOfBirth' as members)
2. Add that Client object to the 'clientList'
next i


The scope in the action-mapping for this action is set to 'session' in
the 
struts config file.

I am getting 'cannot find bean clientList in scope null: 
javax.servlet.jsp.JspException.






_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to