Hi Otmar I'm not certain but stuff inside the ${...} is already assumed to be variable names. What is the type of 'myCollection', is actually a collection? I would assume it is some sort of array and then you can use:
<bean:size id="myId" collection="${myCollection[index].myProperty}"/> Else you should be iterating through the collection to identify individual objects. Give us a bit more detail on the JSP and we might be able to help. If you variables are called 'myCollection1' and 'myCollection2' and you are trying to reference them in a loop I'm not sure you will have much success. You would need some type of eval() function to be able to interpret strings as variable names. I don't know if this can be done - however it's probably not the best practice. Better to structure the data into a collection of objects. Cheers mc On 31 Oct 2005 at 17:39, Otmar Manuela wrote: > Hi, > > Can someone help me with the following? I have the following code in my > jsp file: > > <bean:size id="myId" collection="${myCollection1.myProperty}"/> > > The problem is that I have a number of collections and I want to be able > to dynamically tell the bean which collection to use. The code below > does not work, but it will give you an idea of what I'm trying to > accomplish: > > <bean:size id="myId" collection="${myCollection${index}.myProperty}"/> > > Is there a way to accomplish this? > > Thanks, > > Otmar Manuela > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.362 / Virus Database: 267.12.6/151 - Release Date: 28/10/2005 > FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.12.6/151 - Release Date: 28/10/2005 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]