logic:match tag looks for "value" substring in it's body or in bean setted
by "name" and optionnaly "property" (using toString() for non String
objects).

Your index is an Integer, and this tag uses toString() value, taht is
decimal view of your index. So "0" and "10" and so on have the "0" substring
and match.

Use <logic:equal> to detect your first item.

Nico


----- Original Message -----
From: "Graham Lounder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 3:02 PM
Subject: logic:match question


Hello all,

I'm not sure what is happening here but I think it's an obvious fix, I just
can't see it.  When I'm looping through a logic:iterate tag, I want to
display a message on the first iteration.  I used the IndexId attribute and
created an index and compare it to the value 0.  For some reason, this
evalutates to true for 0 and 10 (and maybe 20 etc... my results don't go
that high).

    <logic:match name='index' value='0'>
        I like cheese!
    </logic:match>

Any Ideas?
Graham



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

Reply via email to