tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject Re: How to determing the relationship between tags
Date Wed, 05 Dec 2001 20:20:09 GMT
On Wed, 5 Dec 2001, bo wrote:

> I wonder if I can determine the relationship among tags, such as tag A
> should be within tag B etc. Is that possible? Thanks!

You can use a TagLibraryValidator class to enforce arbitrary
characteristics of the XML view of a JSP page, including specific
relationships among tags.  For an example of a SAX-based approach to
validation, see the JstlCoreTLV class in the "Standard" taglib.

Tags can also, at runtime, gain access to their parent tag handlers.  The
most convenient mechanism for doing this is, in most cases, the static
TagSupport.findAncestorWithClass() method, part of the JSP API.

Hope that helps,

Shawn


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


Mime
View raw message