I am using the Table class (specifically the HashBasedTable) from the Guava library (formerly Google Collections). I am using Spring MVC and after packaging my beans into this Table in my controller class, I want to iterate over it on my JSP page.
How would I go about doing that? Below is a simplified version of what I'd been trying.
<c:forEach var="rowElement" items="${resultsCL.rowKeySet}">
<c:forEach var="columnElement" items="${resultsCL.columnKeySet}">
${resultsCL.get(rowElement, columnElement)}">
</c:forEach>
</c:forEach>
rowKeySet
and columnKeySet
are not getter-methods, so you can't call them with bean.property
syntax. You need to invoke the methods. I.e. resultCL.rowKeySet()
and resultCL.columnKeySet()
Note that this may not work with older versions of EL that do not support method invocations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With