You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by steve hazelwood <sh...@yahoo.co.uk> on 2004/03/09 14:44:31 UTC
collection of strings (newbie question)
I have an action that creates a bean. That bean has a
property myStrings that returns a collection of String
objects.
On a jsp, I want to list the strings. If my jsp has
this:
<logic:iterate id="myId" name="myBean"
property="myStrings">
<bean:write name="myId"/>
</logic:iterate>
Then I get an exception "Cannot find bean myId in any
scope".
I can understand that cos myId is a String not a bean.
What should I use instead of bean:write ?
Steve
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: collection of strings (newbie question)
Posted by "Daniel H. F. e Silva" <dh...@yahoo.com>.
Hi all,
Other possibility is to check whether 'myBean' exists in some scope.
Cheers,
Daniel Silva.
--- Daniel Henrique Alves Lima <em...@yahoo.com.br> wrote:
> Have you import logic taglibs ?
>
> steve hazelwood wrote:
>
> >I have an action that creates a bean. That bean has a
> >property myStrings that returns a collection of String
> >objects.
> >
> >On a jsp, I want to list the strings. If my jsp has
> >this:
> >
> ><logic:iterate id="myId" name="myBean"
> >property="myStrings">
> > <bean:write name="myId"/>
> ></logic:iterate>
> >
> >Then I get an exception "Cannot find bean myId in any
> >scope".
> >
> >I can understand that cos myId is a String not a bean.
> >What should I use instead of bean:write ?
> >
> >Steve
> >
> >
> >
> >
> >
> >
> >___________________________________________________________
> >Yahoo! Messenger - Communicate instantly..."Ping"
> >your friends today! Download Messenger Now
> >http://uk.messenger.yahoo.com/download/index.html
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: collection of strings (newbie question)
Posted by Daniel Henrique Alves Lima <em...@yahoo.com.br>.
Have you import logic taglibs ?
steve hazelwood wrote:
>I have an action that creates a bean. That bean has a
>property myStrings that returns a collection of String
>objects.
>
>On a jsp, I want to list the strings. If my jsp has
>this:
>
><logic:iterate id="myId" name="myBean"
>property="myStrings">
> <bean:write name="myId"/>
></logic:iterate>
>
>Then I get an exception "Cannot find bean myId in any
>scope".
>
>I can understand that cos myId is a String not a bean.
>What should I use instead of bean:write ?
>
>Steve
>
>
>
>
>
>
>___________________________________________________________
>Yahoo! Messenger - Communicate instantly..."Ping"
>your friends today! Download Messenger Now
>http://uk.messenger.yahoo.com/download/index.html
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org