You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sterin, Ilya" <Is...@ciber.com> on 2002/12/30 00:09:28 UTC
Problem with logic:iterate
I'm trying to implement a multibox, and doing something simple from the
Struts in Action book, give an error...
In my ActionForm class I have...
private String[] selectedItems = {"UPS"};
private String[] items = {"UPS", "FedEx", "Airborne"};
public String[] getSelectedItems()
{
return this.selectedItems;
}
public void setSelectedItems(String[] selectedItems)
{
this.selectedItems = selectedItems;
}
and it works for other things, that are not listed....
In my jsp file I have...
<logic:iterate id="item" property="items">
<html:multibox property="selectedItems">
<bean:write name="item"/>
</html:multibox>
<bean:write name="item"/><br>
</logic:iterate>
Now the multibox stuff works fine without being embedded in the iterate tag,
but the logic:iterate is causing a problem and throws this error...
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:329)
at
org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java
:308)
......
Can someone please help or give some advice:-)
Thanks in advance.
Ilya
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>