${testPrimKey[ctr]}

or perhaps with the wrappers

<c:set var="key" value="${testPrimKey[ctr]}" />
${key}

what does that do?


On 18 Mar 2004, at 12:46, Axel Groß wrote:


hi all!

while trying to figure out how indexed/mapped properties work I get some strange
behaviour - I'm pretty sure this doesn't conform to standard (hope I'm
mistaken):
<logic:iterate id="foo" indexId="ctr" name="mappedTest" property="testPrimKey">
<tr>
<td>${foo}</td>
<td>${ctr}</td>
<td>testPrimKey[${ctr}]</td>
</tr>
</logic:iterate>


evaluates to:
  <tr>
    <td>k1</td>
    <td>0</td>
    <td>testPrimKey[]</td>
  </tr>
  <tr>
    <td>k2</td>
    <td>1</td>
    <td>testPrimKey[]</td>
  </tr>
  ...

where the k1, k2.. are the expected values of key "testPrimKey" in the
HashMap put under "mappedTest" in the PageContext
BUT ${ctr} gets evaluated to different values

I'm using struts1.1 and tomcat 5.0.19
so whose wrong?
me or the result ???

thanks for enlightenment!
Axel

---------------------------------------------------------------------
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