Hi,

I think I�ve set up the iterate tag correctly now:

<logic:iterate name="GBEntryForm"                 <!-- name of form bean -->
           id="gbEntry"                                         <!-- name of
entity bean -->
           scope="session"                                    <!-- session
scope -->
           property="entryList"                              <!-- name of
ArrayList -->
           type="com.morelogs.guestbook.interfaces.gbEntry">

  <bean:write name="gbEntry" property="entry_subject" /><br />
  <bean:write name="gbEntry" property="entry_name" /><br />
  <bean:write name="gbEntry" property="entry_date" /><br />
</logic:iterate>

I�m sure that the above is correct.

What could be the reasons for getting the error stated in the subject line?

Thanks,

Michael


----- Original Message -----
From: "Michael Delamere" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List' (E-mail)" <[EMAIL PROTECTED]>
Sent: Sunday, May 19, 2002 9:58 PM
Subject: Cannot find bean gbEntry in scope null


> Hi,
>
> Sorry to bring this up again, but I still don�t fully understand how to
> iterate through my ArrayList.  I get the error "Cannot find bean gbEntry
in
> scope null" when I try to iterate through my list of objects.
>
> In my ActionServlet I communicate with my ejb session-bean in order to get
a
> list of guestbook entries.  Once I have received the data I add my gbEntry
> entity-beans into an ArrayList using a function in my formBean:
>
>   public void setEntryList(ArrayList _entryList) {
>    this.entryList = _entryList;
>   }
>
> My formBean has session scope:
>
>     <action path="/saveGBEntry"
>             type="com.morelogs.guestbook.actions.SaveGBEntryAction"
>             name="GBEntryForm"
>             input="/jsp/welcome.jsp"
>             scope="session"
>             validate="true">
>        <forward name="success" path="/jsp/displayGBEntries.jsp" />
>    </action>
>
> When my formBean has session scope as stated in the config, does this mean
> that my formBean no longer has to be assigned to the session?
> ================================================================
> As suggested to me I used this in my *.jsp file in order to get at the
list
> of objects.
>
> <!-- where is the _EntryList_ supposed to be mentioned? -->
> <logic:iterate name="GBEntryForm"
>             id="gbEntry"
>             scope="session"
>          property="gbEntry"
>             type="com.morelogs.guestbook.interfaces.gbEntry">
>
>   <bean:write name="gbEntry" property="entry_subject" /><br />
>   <bean:write name="gbEntry" property="entry_name" /><br />
>   <bean:write name="gbEntry" property="entry_date" /><br />
> </logic:iterate>
> =================================================================
> I�ve read the documentation but I�m still not fully clear about where to
> state
>
> 1) GBEntryForm (containing the EntryList)
> 2) EntryList (containing the GBEntry objects)
> 3) GBEntry (object containing the data)
>
> in order to iterate through the list.
>
> Any help would be much appreciated!
>
> Thanks,
>
> Michael
>
>
> --
> 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