I have a List of keys say 'ListA'. And a map of keys & list say 'MapA'. I need to iterate the 'ListA' & for every key need to get its value from 'MapA'. And those values serve as the model for dataTable.
For this purpose,I'm using h:datatable inside ui:repeat.
<ui:repeat var="entry" value="#{bean.sampleDTO.sampleList}"
varStatus="row">
<tr>
<td>#{entry.key}</td>
<td><h:datatable value="#{bean.map[#{entry.key}]}" var="row">
<h:column>
// something
</h:column>
</h:datatable></td>
</tr>
</ui:repeat>
Please consider the value of datatable:
value="#{bean.map[#{entry.key}]}"
The issue is that the key is a variable which I get from #{entry.key}. #{bean.map[#{entry.key}]} is an invalid EL expression as 2 # can't be used.
Thanks, Tarun Madaan
for the el expression : try this
value="#{bean.map[entry.key]}"
you dont need to use #{}
inside #{}
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