struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otmar Manuela <ot...@caribmedia.com>
Subject Re: Expression in an expression?
Date Tue, 01 Nov 2005 16:02:48 GMT
Thanks for the responses. 

I will go with Michael's suggestion.  In the future, the number of 
collections may not stay constant, but if it comes to that, I will have 
to look for an alternative solution.

Otmar Manuela

Michael Rasmussen wrote:

>You could try putting all of your collections into a collection and
>accessing them by the index that way, or you could use a:
>
><c:choose> style approach combined with your current tag and use index
>in a series of <c:when test="${index eq 1}">
><c:set var="myColelction" value="${myCollection1}"/>
></c:when>
></c:choose>
>
>Unfortunately expressions within expressions will not work and
>wouldn't be really clean if you actually did find a way to do it.
>
>On 10/31/05, Otmar Manuela <otmar@caribmedia.com> 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: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message