Thank you Hans! Your TagExtraInfo example was extremely helpful.
The JSP spec ought to include one, but it doesn't.
-Harris
Hans Bergsten wrote:
> Sure, a custom action can declare that it creates a scripting variable that's
> available within the body, or even after the body. Look at TagExtraInfo. You
> need to define a TagExtraInfo subclass for your tag handler, implemented
> something like this:
>
> public class LoopTagExtraInfo extends TagExtraInfo {
> public VariableInfo[] getVariableInfo(TagData data) {
> return new VariableInfo[]
> {
> new VariableInfo(data.getAttributeString("item"),
> data.getAttributeString("class"),
> true,
> VariableInfo.NESTED)
> };
> }
> }
>
> You can then use the tag like this:
>
> <me:loop name="stuff" item="aThing" class="package.Thing" >
> <%= aThing.getRelatedWidget().getName() %><br>
> </me:loop>
>
> Hans
> --
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html