I've never had a need to do anything like what you're doing, but I can tell
you that ${} needs to contain the entire expression. Try this:
<html-el:text property="myIndexedProperty[${outerLoop.index *
innerLoop.index}]"/></td>
On 20050602 11:22 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
>
>
>
>
> Is it possible to do more than just simple loop index evaluation with
> html-el tags?
>
> I iterate over 2 loops:
>
> <c:forEach var="outerMapEntry" items="${outerMap}"
> varStatus="outerLoop">
> <tr><td><c:out value="${outerMapEntry.key}"/></td>
> <c:forEach var="innerMapEntry" items="${outerMapEntry.value}"
> varStatus="innerLoop">
> <td><html-el:text
> property="myIndexedProperty[${innerLoop.index}]"/></td>
> </c:forEach>
> </tr>
> </c:forEach>
>
> However, within my inner loop, I want to calculate the index as follows:
>
> outerLoop.Index * innerLoop.size + innerLoop.index
>
> My questions are:
>
> 1) The following works for me,
>
> <td><html-el:text
> property="myIndexedProperty[${innerLoop.index}]"/></td>,
>
> But if I try to do any calculations like so,
>
> <td><html-el:text property="myIndexedProperty[${outerLoop.index} *
> ${innerLoop.index}]"/></td>
>
> I get errors, saying that there is no such getter defined.
>
>
> 2) Surely, it should be possible to use html-el to access map entries
> directly? The form I have has a Map of Maps. I need to access the inner
> map values, put them in a table, allow editing / submission of those
> values. It seems to be excessively convoluted to put the map values in
> an arraylist, just so I can access them using indexed properties.
>
> Thanks,
>
> ---------------------------------------------------------------------
> 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]