tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Pilka <c.pi...@provacanza.de>
Subject Re: Substitution of a variable in a variable
Date Tue, 29 Mar 2005 12:51:56 GMT
Well, works fine. Mni thx ;-)

Chris

David Schwartz wrote:

>In your SQL statement use an alias...
>
>SELECT name_${language} As namedLanguage,
>iso3166
>FROM countries
>ORDER BY name_${language}
>
>In the <option> list...
>
><option value="<c:out value='${row.iso3166}' />">
>    ${row.namedLanguage}
></option>
>
>now your result column will always have the same, expected name.
>
>Quoting Christoph Pilka <c.pilka@provacanza.de>:
>
>  
>
>>>Hi folks,
>>>
>>>anyone knows how to express the following snippet?
>>>
>>><sql:query var="myQuery">
>>>  SELECT name_${language}, iso3166 FROM countries ORDER BY name_${language}
>>></sql:query>
>>><c:forEach var="row" items="${myQuery.rows}">
>>>  <option value="<c:out value='${row.iso3166}' />">
>>>    ${row.name_${language}}
>>>  </option>
>>></c:forEach>
>>>
>>>The expression ${row.name_${language}} is the one making trouble. How to
>>>substitute a variable in a variable?
>>>
>>>Mni thx,
>>>Chris
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>>
>>>
>>>      
>>>
>
>
>David Schwartz
>Array Software Inc.
>http://www.arrayone.com
>  
>


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


Mime
View raw message