Absolutely right.

What this code is trying to say, is that the nested tags need a valid 
"root" tag on each JSP. In this case, David's used the <nested:root> 
tag. It can also be the <html:form> or <nested:form> tags. The form tags 
are bound to their form definition in struts-config.xml, to escape this 
and use an external bean, the <nested:root> tag is required.

Reason for all this, is the tags look up their parent tag, and it in 
turn looks to its parent etc etc etc. If there's no root tag, then 
they'll run out, and not know what bean they're meant to be working off of.

Even when nesting through dynamic includes, the included JSP's need a 
<nested:root> tag without parameters, so it's child tags can get that 
reference without running off the top of the JSP page looking for a parent.

Just in case anyone wanted the explanation.


Arron.



David Morris wrote:

>Dean,
>
>This is like the blind leading the blind. I wonder why you don't want
>to 
>declare a form but something like this should work:
>
><nested:root name="attributeNameOfBeanContainingYourCollection">
><nested:nest property="myCollection">
><nested:iterate property="myCollection">
><nested:write property="myDate"/>
></nested:iterate>
></nested:nest> 
></nested:root> 
>
>David Morris
>
>>>>[EMAIL PROTECTED] 06/03/02 04:07PM >>>
>>>>
>
>...This works, where filter.do maps to the form that holds
>myCollection:
><html:form action="/filter.do">
>       <nested:nest property="myCollection">
>               <nested:iterate property="myCollection">
>                       <nested:write property="myDate"/>
>               </nested:iterate>
>       </nested:nest>  
></html:form>  
>
>This doesn't:
>       <nested:nest property="myCollection">
>               <nested:iterate property="myCollection">
>                       <nested:write property="myDate"/>
>               </nested:iterate>
>       </nested:nest>  
>
>Thanks in advance.
>
>Dean Chen
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to