You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Fred Livingston <FL...@physiome.com> on 2001/12/19 23:50:16 UTC

help with iterate tag

Hi all:

I am having a problem with iterate tags:

The following line of code returns a correct result independent of an
interate tag:

<bean:write name="searchForm" property="userSearchResults[0].userName"/>

Thus I know the bean has the information I want...

But the following gives errors:

<logic:iterate id="searchForm" name="userInfoForm"
property="userSearchResults">
<bean:write name="searchForm" property="userName"/>
...

with these errors:

Location: /userdisplay.jsp
Internal Servlet Error:
javax.servlet.ServletException: Cannot find bean userInfoForm in scope null
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)

Any thoughts? I have fussed around with many of the logic:iterate
parameters...

Thanks in advance

-Fred


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: help with iterate tag

Posted by Andras Balogh <an...@reea.net>.
Hi,

I think you placed the wrong id in logic:iterate.
It should be something like this(not tested):

<logic:iterate id="logicnewid" name="searchForm"  property="userSearchResults">
<bean:write name="logicnewid" property="userName"/>
...

Hope it helps,

Andras.

 
ps. Look at the logic:iterate tag description on the struts site.
 

On Thu, 2001-12-20 at 00:50, Fred Livingston wrote:
> Hi all:
> 
> I am having a problem with iterate tags:
> 
> The following line of code returns a correct result independent of an
> interate tag:
> 
> <bean:write name="searchForm" property="userSearchResults[0].userName"/>
> 
> Thus I know the bean has the information I want...
> 
> But the following gives errors:
> 
> <logic:iterate id="searchForm" name="userInfoForm"
> property="userSearchResults">
> <bean:write name="searchForm" property="userName"/>
> ...
> 
> with these errors:
> 
> Location: /userdisplay.jsp
> Internal Servlet Error:
> javax.servlet.ServletException: Cannot find bean userInfoForm in scope null
> 	at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:459)
> 
> Any thoughts? I have fussed around with many of the logic:iterate
> parameters...
> 
> Thanks in advance
> 
> -Fred
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>