Hi all,
I'm trying to cast a collection of beans to a session obect, so it can be used to populate a javascript drop down list. Using the
struts iterate tag, these results can be found if the scope variable is set to request. If session is set, then the specified bean (resourcesList) cannot be found in scope session. In
testing, I tried specifying a name equal to a prexisting form bean in the struts-config file, and changed the iterator to point to this. This resulted in a error about unable to create iterator for collection.
I think I need to specify a form bean that can be iterated, but am unsure as to how to go about it. I tried defining one based on java.util.collection, but this didn't help. Do I need to make a new bean conatininig an array, and populate that with the information in the list returned by the DAO?
Any help would be much apprieciated.
Regards,
Ols
Code:
Iterator
struts-config.xml Entry
Action Bean
Data access object method
[ January 12, 2004: Message edited by: Oliver Moore ]