Tony Abbott wrote:
>
> Hi there
>
> I am trying to create a custom tag that can be nested inside itself (like <td>
> can), but I want it to set a page variable. The problem comes with the declare
> field in VariableInfo that the TEI returns. I can't set it true, becuase when
> it reaches the inner tag it complains that it is redefined, but if I set it
> false then it never gets defined in the first place. I understand why this is
> happening, but I can't seem to find any way around it. I hoped there would be
> some way to detect the fact that it has already been defined or even just the
> nesting from TagData, but I can't find any way... Has anyone done this? Anyone
> got any ideas? This would be a severe limitation if there is no way around it.
> (I have tried on Orion and Tomcat, btw, with no luck).

Can you use different variable names for each instance, either based on
an attribute value the page author provides (e.g. id="foo" in the first and
id="bar" in the nested), or a dynamically generated unique name (e.g. based
on a timestamp and a random number)? There's no way to find out when
getVariableInfo() is called that it's for a tag that's nested within another.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to