Hi all,
 
I have a form with a nested bean.  That bean contains a collection I'm
trying to iterate with indexed properties.  I tried first doing this without
the nested tags but had no success.  (The page displayed but instead of
myForm.nestedBean.element[0].property, I only got element[0].property.)  I
did add the extra getter and setter to the nestedBean, but I guess Struts
expects it to be on the form.
 
I then tried the nested tags based on this post:
http://marc.theaimsgroup.com/?l=struts-user
<http://marc.theaimsgroup.com/?l=struts-user&m=105364604308495&w=2>
&m=105364604308495&w=2.  This seemed promising, but the page won't even
render.  The relevant part of the stack trace is at the end of this message.
My jsp code looks like this:
 
    <nested:nest property="clientDoc">
        <nested:iterate property="defects">
            </tr>
                ...
                <td>
                    <nested:text property="statusEffectiveDate"/>
                </td>
            </tr>
        </nested:iterate>
    </nested:nest>

"clientDoc" is the bean on the form.  "defects" is a collection on the form.
"statusEffectiveDate" is a property of each element in the defects
collection.  I ran the debugger and can see that NestedIterateTag's
"property" property is set to "clientDoc.defects," which seems reasonable,
and "originalProperty" is set to "defects."  Some attr is trying to be
looked up, but it's name is null.  I'm using Struts 1.1 rc1.
 
thanks a lot
 
 
java.lang.NullPointerException
 at java.util.Hashtable.get(Hashtable.java:329)
 at
org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java
:308)
 at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:787)
 at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:835)
 at
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
 at
org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag(NestedIter
ateTag.java:123)
 at
org.apache.jsp.doc_0002ddefects_jsp._jspService(doc_0002ddefects_jsp.java:15
8)
 
john gregg
Wells Fargo Services Company
Minneapolis, MN
 

Reply via email to