Hi all, I would like to use a different ArrayList for the content of a table based on a user selected value.
I am using the display:table tag for the display
<display:table name="${aVariableName}">
<display:column property="trackNumOfType" title="Track (# of Types)" sortable="true"></display:column>
<display:column property="typeNumOfFeature" title="Type (# of Features)" sortable="true"></display:column>
</display:table>
How can I replace the aVariableName based on user's selected value in a dropdown list that should be the name of another set variable?
For your reference, this is my dropdown list:
<form method="post" action="PostBackToTheCurrentJSP.jsp">
<select name="choice" size="1" onchange="submit()">
<c:forEach var="chrms" items="${LocationName}" varStatus="loopStatus">
<c:choose>
<c:when test="${param.choice == chrms.name}">
<c:set var="selectedInd" value=" selected"></c:set>
</c:when>
<c:otherwise>
<c:set var="selectedInd" value=""></c:set>
</c:otherwise>
</c:choose>
<option value="<c:out value='${chrms.name}' />" <c:out value='${selectedInd}' />>
<c:out value="${chrms.name}"></c:out>
</option>
</c:forEach>
</select>
</form>
If using JSTL is not feasible since there is no nested EL, do you have any other way to do it? Thanks in advance.
Kenneth