Question

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?

Was it helpful?

Solution

I am assuming that you are using GF4. This was a bug. Try updating your javax.faces jar with the latest released one.

OTHER TIPS

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top