Thanks for the reply Aaron.

I did not have any nested tags in the top page.... so I added one and
now my code looks like this:

(Your example referenced <nested:property> and I assume you meant
<nested:nest>)

<html:form action="/Time/SaveTimesheet" styleId="GridForm">
  <nested:nest property="timesheetForm">
    <jsp:include page="TimesheetGrid1View.jsp" />
  </nested:nest>
</html:form>

I am still getting the null reference on the first nested tag in the
included jsp.  I am using Struts 1.1B2.

I must admit to not totally understanding your explanation of what
property to reference in the nested parent tag -- I am referencing my
form object (which is, in fact, the parent I want).  I am also still a
bit confused on whether I need a nested root tag or not.

Thanks very much for the help.

Chris

-----Original Message-----
From: Arron Bates [mailto:struts-user@;keyboardmonkey.com] 
Sent: Thursday, November 14, 2002 2:21 PM
To: Struts Users Mailing List
Subject: RE: nested:iterate in an included page


You need at least one nested parent tag on the top page with the
<html:form> 
tag. This will allow the nested tags to put their parent reference into
the 
request object, from which the nested tags in the included page can pick
it 
up.

eg:

<html:form action="/Time/SaveTimesheet" styleId="GridForm">
  <nested:property property="someProperty">
    <jsp:include page="TimesheetGrid1View.jsp" />
  </nested:property>
</html:form>

...and no, you can't use "./" or "this/", but can be a "fake" property
(a 
named property which just returns a reference to the same bean).

If there's already a nested level like this, then it's a case of
versioning. What version of Struts are you using?...


Arron.


> Thanks Drew... thanks for your response.
> 
> I know the code will work if the form tag is on the same page -- I 
> have code like that in other places.  The reason for the inlcude is to

> reuse pieces of the page and putting the form in the included file 
> would defeat that purpose in this case.
> 
> Chris
> 
> -----Original Message-----
> From: Drew Zimber [mailto:drew.zimber@;shaws.com]
> Sent: Thursday, November 14, 2002 1:12 PM
> To: 'Struts Users Mailing List'
> Subject: RE: nested:iterate in an included page
> 
> just ran into this yesterday.  From what i can tell, the nested tags 
> NEED the <html:form> tags on that very page, or else it cant seem to 
> resolve the form object.  If anyone knows a way around this, i'd like 
> to hear it as this seems to defeat the purpose of templating...
> 
> try putting the form tags just on that included page and see if you 
> get the errors.
> 
> dz
> 
> -----Original Message-----
> From: Chris Sargent [mailto:csargent@;aerisinc.com]
> Sent: Thursday, November 14, 2002 4:07 PM
> To: Struts Mail List
> Subject: nested:iterate in an included page
> 
> I am having trouble using the nested:iterate tag in a page that I am 
> including using jsp:include.  I am probably doing something silly, but

> could someone provide some help?  My main page looks like this:
> 
>    ...
> 
>    <html:form action="/Time/SaveTimesheet" styleId="GridForm">
>    ...
>    <jsp:include page="TimesheetGrid1View.jsp" />
>    ...
> 
> And the included page looks like this:
> 
>    <nested:root name="timesheetForm" />
>    ....
>    <nested:iterate indexId="index" id="entry" 
> property="timesheet.line[0].entry" type="TimesheetLineEntry">
>     ....
> 
> I get a null ref error on the nested:iterate tag in the included page.
> 
> Any help is much appreciated!
> 
> Chris
> 
> --
> To unsubscribe, e-mail: 
> <mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:struts-user-help@;jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-
[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:struts-user-
[EMAIL PROTECTED]>





--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to