newton.dave wrote:
> 
> --- On Fri, 11/7/08, SanJ.SANJAY wrote:
>> I am trying to display the collection that I am setting in
>> struts action to the request scope.
> 
> The code is putting it in session scope, FWIW:
> 
>> request.getSession().setAttribute("xxxCollection", xxxCollection);
>> [...]
>> <logic:iterate id="iprecord" indexId="ind" name="xxxCollection" >
>>   <bean:write name="iprecord" property="xxxCollection" />
>> </logic:iterate>
> 
> Does it not recognize the *collection*? In other words, is it not
> iterating at all? Or is the <bean:write...> funky: does each element of
> xxxCollection have an xxxCollection property and is printing that what you
> really mean to do?
> 
> Dave
> 
> I changed to put that in direct request also and did'nt work:
>  request.setAttribute("xxxCollection", xxxCollection);
> 
> I could see the elements of collection when I use java in jsp using
> scriptlets (<%%>) and in the same page if I use struts <logic:iterate> ,
> it does'nt see the bean.
> 
>>Does it not recognize the *collection*? In other words, is it not
iterating at all? Or is the <bean:write...> >funky: does each element of
xxxCollection have an xxxCollection property and is printing that what you
>really mean to do?
> 
> Ok, I have this question, do we really need to have the property in
> collection? Can't I use collection with direct elements in it by setting
> that to request? 
> ex.
> 
> for(int i=0;i=list.size();i++) {
> xxxCollection.add(i);
> }
> 
> request.setAttribute(xxxCollection);  ???? Can we do like that and use
> logic:iterator? I tried this 
> and it did'nt work.
> 
> And if suppose  I use a property "filename" and add that to collection
> "xxxCollection" and set the "xxxCollection" to request, all I need to do
> is have this properties POJOS in form right? 
> 
> ex:
> 
> FileForm myForm = (FileForm) form;
> 
> for(int i=0;i=list.size();i++) {
> 
> myForm.setXXXElement()
> 
> }
> 
> Any insights??
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-logic%3Aiterate-does-not-recognize-the-collection.-tp20385273p20385617.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to