I have not used the indexId property before myself, but I have experienced with other properties/tags that names you define in the tag itself is not available from scriptlets. So the snippet <%= index%> will return an empty string or fail.
ida -----Original Message----- From: Graham Lounder [mailto:[EMAIL PROTECTED]] Sent: 25. april 2002 14:36 To: [EMAIL PROTECTED] Subject: logic:iterate question Hello all, I've got a question about the logic:iterate tag. I'm trying to reference a bean which returns a String[] but I only want one of the values in the array. The indexID is working but it isn't getting passed to the bean:write tag corretly. It throws a java.lang.IllegalArgumentException: Invalid indexed property 'attributeNames[]' If I passed the bean a hardcoded index value, it works. I can also print out the value of the index. I think it may be some kind of timing issue in struts and maybe it can't be done. Any Ideas? <logic:iterate id='element' name='attribute' scope='page' type='java.lang.String' indexId='index'> <bean:write name='MAP_STATE_KEY' property='mapController.dataConnection.attributeNames[<%= index %>]' scope='session'/> </logic:iterate> Thanks, Graham -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>