I am trying to use a JSTL variable inside another variable. The code below will explain it better.
<display:table id="resultsRow" name="${actionBean.list}" >
<c:forEach items="${actionBean.anotherList}" var="columnName">
<display:column sortable="true" property="${resultsRow.${columnName}"/>
</c:forEach>
</display:table>
So basically i am passing a list to the display table tag "name="${actionBean.list}". Then i use the id property of the display table tag to loop through the list objects (id="resultsRow").
Now for the column property attribute i need to access different properties inside the list object. This is being done using the for:each which provides me will all the object property names. If you are wondering why its implemented this was instead of just column, its because i am using a DynaBean Object and the properties are dynamic.
Question: Can i used nested vairable names like i did in display column tag property attribute?
I need to: 1) evaluate columnName and get a value ( Lets say i get "price" string) 2) concatenate this value to the our variable (${resultsRow.price}) 3) execute ${resultsRow.price}