Hi Chris,

Thanks for the pointer. I am a bit confused though with the following:
I would like to implement the second suggestion you made, ie to allow the 
variable to be named explicitly from within the tag. My problem is that 
in the IterationTagExtraInfo I must create a variable with a name, if the 
name of the variable is itself variable, how do I pass this name to the 
the IterationTagExtraInfo class? If you know what I mean? Do I just 
create a getVariableName in the IterationTag and then call it from the 
IterationTagExtraInfo class?

I tried changing the scope of the variable which doesn't really work as 
then I get the 
"Bean 'name' already defined" error when the tags are not nested. I tried 
changing the 'declare'
boolean parameter to false, so the tag will update the variable, rather 
than creating a new one but since the variable doesn't yet exist when 
first calling the tag, this didn't work either.

 ??

Thanks for the help
Joel

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 10/3/01, 5:41:59 PM, Chris Pratt <[EMAIL PROTECTED]> wrote 
regarding Re: JSP Tags:


> My guess is that your IterationTagExtraInfo says that the IterationTag
> creates a variable named "name" and since you're trying to nest one 
within
> the other, the translater has created two variables named "name" in the 
same
> scope, which of course is illegal.  You might want to investigate either
> changing the variable's scope in the VariableInfo you're using in
> IterationTagExtraInfo, or maybe allow the variable to be named explicitly
> from within the tag, something like:

> <Joel:IterationTag name="outterValue" list=arrayList>
>  <stuff>
>   <%=outterValue%>
>    <Joel:ItrationTag name="innerValue" list=arrayListTWO>
>         <moreStuff>
>           <%=innerValue%>
>    </Joel:IterationTag>
>  </stuff>
> </Joel:IterationTag>

> (*Chris*)

==========================================================================To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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