Janice,

Does this snippet work if you move all of the bean:defines insidea of your
logic:iterate?

I haven't tested this myself, but I strongly suspect that the problem is the
fact that bean:define declares the variable in the resulting servlet code
that gets generated. It's trying to declare a variable more than once if you
do that.

But you can declare the variable inside of a loop in java and it works just
fine.

So of you made it such that the <bean:define> tags were all inside of the
loop and only one of the bean:defines for this bean gets called each time
through the loop, I bet that it would work fine.

Failing that, I'm +1 on the scriptlet thing like Wendy says.

-Joe


>         <bean:define id="lastClientName" value="" />
>        
>         <logic:iterate id="widget" name="widgets">
>         
>         <logic:notEqual name="widget" property="clientName"
> value="<%=lastClientName%>">
>         <tr>
>           <td colspan=all>
>             client: <bean:write name="widget" property="clientName" />
>           </td>
>         </tr>
>         <bean:define id="lastClientName" name="widget" 
> property="clientName"
> />
>         </logic:notEqual>
> 
> End of snip.
> 
> This won't compile since bean "lastClientName" has already 
> been defined.  I can't change my version of Struts.
> 
> What would be some clean syntax to use instead?
> 
> Thanks so much in advance!
> 
> J
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to