I have a List
of two Objects and I am clueless what is going wrong
<div> - </div>
- that is what I am struggling withI have the following facelets code:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
template="myTemplate.xhtml">
<ui:define name="content">
<!-- 1. -->
you're managing: #{adminBean.managedPersons}
<!-- 2. -->
<div>
<ui:repeat var="#{adminBean.managedPersons}" value="person">
- #{person}
</ui:repeat>
</div>
<!-- 3. -->
<p:selectOneMenu>
<f:selectItems value="#{adminBean.managedPersons}" var="person" itemLabel="#{person.name}"/>
</p:selectOneMenu>
</ui:define>
</ui:composition>
I mixed up var
- and value
-attributes on the <ui:repeat>
.
WRONG:
<ui:repeat var="#{adminBean.managedPersons}" value="person">
RIGHT:
<ui:repeat var="person" value="#{adminBean.managedPersons}">
It's was not the first time, this drives me nuts. Maybe this will help someone...