You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jeff Kyser <kt...@comcast.net> on 2003/06/10 03:51:54 UTC

Re: nested tags

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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Re: nested tags

Posted by "Frances Aleah Z. de Guzman" <ad...@ingenium.com.ph>.
thanks for the info and the link...i just visited it and i think it will help 
me alot...thanks again.

On Tuesday 10 June 2003 09:51 am, Jeff Kyser 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: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

-- 
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: nested tags

Posted by arvind ramaswami <ar...@yahoo.com>.
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 <kt...@comcast.net> 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:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


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

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