struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: Struts logic:iterate does not recognize the collection.
Date Fri, 07 Nov 2008 19:19:13 GMT
--- On Fri, 11/7/08, SanJ.SANJAY wrote:
> [...] I think the reason is that the moment it tries to read
> proper xxxCollection in iterator tag, it throws error
> "bean xxxCollection is not found in any any scope" 

Such information is useful; I don't recall you mentioning that before.

> I am confused between "id" and "name" properties of this iterator tag. 

See [1] (or your appropriate version), which states:

id: The name of a page scope JSP bean that will contain the current element of the collection
on each iteration, if it is not null.

name: The name of the JSP bean containing the collection to be iterated (if property is not
specified) [...]

"Name" is the collection. "id" will be set to each element of the collection.

> what should be the "id" here if "name="xxCollection" "
> 
> <logic:iterate id="??" name="xxCollection">
>    <bean:write name="xxCollection" />
> </logic:iterate>

<logic:iterate id="foo" name="xxCollection">
  <bean:write name="foo" />
</logic:iterate>

But this isn't the issue.

It could just be that I'm completely mis-remembering how <logic:iterate...> works, because
I don't see anything particularly wrong. You're including the taglib directives, right?

Dave

[1] 1.x <logic:iterate...> docs:
    http://struts.apache.org/1.x/struts-taglib/tlddoc/logic/iterate.html


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message