You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Michael C. Clark" <me...@michaelcclark.com> on 2003/06/13 18:55:59 UTC
logic:iterate ActionForm array
I'm trying to populate a multibox from an array that lives in my
ActionForm (like the example in Ted's book p. 298). I keep getting a
NullPointerException when the logic:iterate tag trys to read the
String array property from the ActionForm.
If I create the String array in the JSP and set it to the
PageContext, all works fine. Seems I should easily be able to call
it from the ActionForm though...it's just a bean after all.
In the JSP I'm using
<logic:iterate id="name" property="names">
...
</logic:iterate>
Where "names" is the String array in the ActionForm.
Thanks,
Mike Clark
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: logic:iterate ActionForm array
Posted by James Mitchell <jm...@apache.org>.
It works fine for the taglib test suite. Can you post your action code
(where you setup the array and store it in the request/session)?
You ARE using a defined form on the page right?
--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
770-822-3359
AIM:jmitchtx
----- Original Message -----
From: "Michael C. Clark" <me...@michaelcclark.com>
To: <st...@jakarta.apache.org>
Sent: Friday, June 13, 2003 12:55 PM
Subject: logic:iterate ActionForm array
> I'm trying to populate a multibox from an array that lives in my
> ActionForm (like the example in Ted's book p. 298). I keep getting a
> NullPointerException when the logic:iterate tag trys to read the
> String array property from the ActionForm.
>
> If I create the String array in the JSP and set it to the
> PageContext, all works fine. Seems I should easily be able to call
> it from the ActionForm though...it's just a bean after all.
>
> In the JSP I'm using
>
> <logic:iterate id="name" property="names">
> ...
> </logic:iterate>
>
> Where "names" is the String array in the ActionForm.
>
> Thanks,
> Mike Clark
>
>
> ---------------------------------------------------------------------
> 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