Reputation: 169
I am having a simple backing bean:
@Named
@RequestScoped
public class BackingBean {
public String[] getStorageLocations() {
return new String[]{"0088", "0016", "0022"};
}
}
In the xhtml file I am using a <ui:repeat />
tag to output the array of strings from the backing bean:
<ui:repeat value="#{backingBean.storageLocations}" var="location">
<h:panelGroup layout="block">
<h:outputText value="#{location}" />
</h:panelGroup>
</ui:repeat>
What I am expecting is this:
<div>0088</div>
<div>0016</div>
<div>0022</div>
What I acutally receive from JSF is this:
<ui:repeat>0088</ui:repeat>
<ui:repeat>0016</ui:repeat>
<ui:repeat>0022</ui:repeat>
What am I doing wrong?
Upvotes: 0
Views: 457
Reputation: 2739
A simpler solution: change the xmlns url to sun's:
from:
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
to:
xmlns:ui="http://java.sun.com/jsf/facelets"
(thanks http://blog.coffeebeans.at/?p=775)
Upvotes: 1
Reputation: 2719
I am assuming that you are using GF4. This was a bug. Try updating your javax.faces jar with the latest released one.
Upvotes: 1