You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Je...@nlgroup.ca on 2002/11/26 22:47:32 UTC

[Nested Tags] Frustration..Should this work?

Greetings:
All I am trying to do is display a a selected item form a list.

 - pageList is standard java.util.List of LabelValueBeans set in page
scope.
 - cc is a String pulled out of the form bean and set to page scope.

Using the nested tags my first approach was this:

 <nested:iterate  name="pageList" >
      <nested:equal  property="value" value="<%= cc %>">
                <nested:write   property="label"/>
      </nested:equal>
  </nested:iterate>


But to get it working I am forced to  redo it like this:
<nested:iterate   id="it" name="pageList" type="org...LabelValueBean">
     <logic:equal  name="it" property="value" value="<%= cc %>">
            <bean:write  name="it" property="label"/>
     </logic:equal>
</nested:iterate>

Before I report this to bugzilla, I would like it  if someone could tell me if I am doing something wrong.

The error I get is:
2002-11-26 15:32:23 ApplicationDispatcher[/ar] Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
      at java.util.Hashtable.put(Hashtable.java:394)
      at org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.java:229)
      at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:390)
      at org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag(NestedIterateTag.java:121)
      at org.apache.jsp.DetailedProfileReadOnlyForm$jsp._jspService(DetailedProfileReadOnlyForm$jsp.java:336)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)



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