struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Lounder" <loun...@caris.com>
Subject logic:iterate question
Date Thu, 25 Apr 2002 12:35:41 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message