Bear with me because I am new at this. Is there a way for the
beginning <layout:apppage> tag to know what all of its child tags are
before the child tags are invoked? The leftnav and rightnav tags are
optional and I need to output HTML differently in the beginning
apppage tag based on what is present.
<layout:apppage>
<layout:leftnav> <!-- code here --> </layout:leftnav>
<layout:rightnav> <!-- code here --> </layout:rightnav>
<!-- my app code -->
</layout:apppage>
Also, both leftnav and rightnav have child tags of their own, I am
having trouble figuring out how to save all the HTML they generate and
output it with the ending apppage tag.
Thanks
Dan Andrews - 11 Mar 2007 23:50 GMT
> Bear with me because I am new at this. Is there a way for the
> beginning <layout:apppage> tag to know what all of its child tags are
[quoted text clipped - 15 lines]
>
> Thanks
Have a look at the article that Jeff Wilson wrote titled "Take control
of your JSP pages with custom tags." There is also a good code sample
there that you can download. Here is the link:
http://www-128.ibm.com/developerworks/java/library/j-taglib/
Cheers,
Dan Andrews
-------------------
http://www.ansir.ca
johkar - 13 Mar 2007 01:05 GMT
> Have a look at the article that Jeff Wilson wrote titled "Take control
> of your JSP pages with custom tags." There is also a good code sample
[quoted text clipped - 3 lines]
>
> Dan Andrews
Thank you, very helpful.
Tom Hawtin - 12 Mar 2007 00:11 GMT
> Bear with me because I am new at this. Is there a way for the
> beginning <layout:apppage> tag to know what all of its child tags are
> before the child tags are invoked? The leftnav and rightnav tags are
> optional and I need to output HTML differently in the beginning
> apppage tag based on what is present.
The simple answer is no.
The possibly more useful answer is that you can evaluate the body, but
defer from passing on the output. If you buffer the output. then you can
change the header depending upon how the execution went within the body.
I've not done this sort of thing for five or six years, so can't
remember the details of the APIs. Example code is left as an exercise
for the reader.
Tom Hawtin
johkar - 13 Mar 2007 01:06 GMT
> johkarwrote:
> > Bear with me because I am new at this. Is there a way for the
[quoted text clipped - 14 lines]
>
> Tom Hawtin
Thank you.