Nested tags rock, as you have to deal with only one
level in the heirarchy at a time. I have been running
into some problems using nested tag for recursion,
though.  I thought you might help me out while we are
on same subject.

My questions are :

1. Does the nested tag lib require struts to be used ?
 I have nested-tag.jar and struts.jar in the
WEB-INF/lib but the application is not based on struts
framework. It is an MVC  app but with our own
controller servlet and mapping(like struts-config). 
When I tried, I got this dreaded error :

Cannot find message resources under key
org.apache.struts.action.MESSAGE'
javax.servlet.ServletException: Cannot find message
resources under key org.apache.struts.action.MESSAGE
        at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)

This makes  me wonder if struts framework is actually
needed for nested tags. Any help would be
appreciated..

2. I can't do a  <nested:define> in my included JSP as
I get a null pointer exception. 

Main jsp :
<nested:root name="docs">
    <nested:nest property="treeNode">
         <nested:iterate property="childCollection">
                    <jsp:include page="docnode.jsp" />
         </nested:iterate>
    </nested:nest>
</nested:root>

docnode.jsp (this recurses):

<nested:root>
        <nested:equal property="showChildren"
value="true">
         <nested:define id="imgState"
value="open18x16.gif" />
        </nested:equal>
        <!-- restof html code-->
       
      <nested:iterate property="childCollection">
            <jsp:include page="docnode.jsp" />
       </nested:iterate>

    </nested:equal>
</nested:root>

What am i doing wrong?

thanks
arvind


--- Jeff Kyser <[EMAIL PROTECTED]> wrote:
> Nested tags rock whereas logic tags, while perhaps
> doing
> the same thing are more cumbersome.
> 
> Scoping is much more intuitive - instead of having
> to talk
> about 'myForm.myContainer.myObject, you can just
> use nested:iterate and nested:nest to make your code
> much easier to read. And, since you can write
> snippets
> to the more localized scope, they can be reused on
> multiple
> pages.
> 
> And, if that wasn't enough, you can do recursion
> with nested.
> 
> See the www.keyboardmonkey.com site for examples,
> etc.
> 
> -jeff
> 
> On Monday, June 9, 2003, at 08:56  PM, Frances Aleah
> Z. de Guzman wrote:
> 
> > what is the difference between nested tags and
> html tags?
> > -- 
> > Frances Aleah Z. De Guzman
> > SA/Programmer
> > Ingenium Technology, Inc.
> > http://www.ingenium.com.ph
> >
> > Disclaimer :
> > This message is intended only for the named
> recipient. If you are not 
> > the
> > intended recipient you are notified that
> disclosing, copying, 
> > distributing
> > or taking any action in reliance on the contents
> of this information is
> > strictly prohibited.
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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

Reply via email to