javax.el.PropertyNotFoundException: Property not found on type org.hibernate.collection.internal.PersistentSet

孤街醉人 提交于 2019-11-29 10:53:44
<h:dataTable value="#{car.terminals}" var="der">
    <p:column>
        <h:outputText value="#{der.geometrie}" />

javax.el.PropertyNotFoundException: Property 'geometrie' not found on type org.hibernate.collection.internal.PersistentSet

Thus, the #{car.terminals} is a Set<E>. The <h:dataTable>, <p:dataTable> and <ui:repeat> components doesn't support iterating over a Set<E>. The #{der} will then basically represent the Set<E> itself. The builtin support for iterating over Set<E> will come in future JSF 2.3 version.

If it's not an option to replace Set<E> by a List<E>, then just get an array out of it as below:

<h:dataTable value="#{car.terminals.toArray()}" var="terminal">
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!