struts wrote:
Hi,
I'm using Struts 1
I have a set of indexed error properties :
myProprty0
myPorperty1
myProperty2
and so on
I'd like to be able to pass the relevant name in to <html:errors property
via a variable – for example:
<c:set var="total" value="${0}"/
<iterate...>
<c:set var="myErrProp" value="$myProprty{total}" />
<html:errors property="<c:out value="${myErrProp" /><br/>
<c:set var="total" value="${total + 1}"/>
</iterate>
Is there a way to do this?
Not really; it *might* be possible to do some funky EL manipulation like:
<c:set var="prop" value="myProperty${total}" />
<html:errors property="${myform[prop]}" />
although it may take a bit of fiddling to find the right combination of
syntax. But really, you'd be better off using an array or list -- i.e. a
'real' indexed property, instead of pseudo-indexed properties using a
naming convention.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]