I have problem with ui:repeat
in h:dataTable
tag. I have one collection with names of the field ant another with data. So I am matching them by indexes. When I load the page, exception OutOfBoundsException
is thrown. But when i put filingCabinetManagerBean.filingCabinet.schema.fields.indexOf(schemaField)
outside ui:repeat
, it displays correct indexes. So I have tried to split it and declared ui:param
and also c:set
as variables but same problem. cardData
attribute of actualCard is not null, nor empty, it has 7 items in it, I've already debugged it. So do you have any idea what might be the problem?
PS: When I change ui:repeat
for h:dataTable
, it is working. And best of all, identical construction is used on another JSF page and it is working, there is only one difference - I get cardData
from card which is referenced in one outer dataTable, so it is not Bean(dot)
property and so on, but only variable(dot)
so on.
Any ideas? Thank you for your help. :)
<p:panel header="#{fileUploadBean.actualCard.id}">
<h:dataTable value="#{filingCabinetManagerBean.filingCabinet.schema.fields}" var="schemaField" style="vertical-align: top">
<h:column><h:outputText value="#{schemaField.fieldTitle}:" style="font-size: 20px;font-weight: bold"/></h:column>
<h:column>
<ul>
<ui:repeat value="#{fileUploadBean.actualCard.cardData.get(filingCabinetManagerBean.filingCabinet.schema.fields.indexOf(schemaField)).data}" var="data">
<li><h:outputText value="#{data.string}"/></li>
</ui:repeat>
</ul>
</h:column>
</h:dataTable>