title: Custom component inside <ui:repeat> doesn't find iterated item during encode
body: <p>I'm trying to create a custom component for displaying an Entity with a certain form. So I've created my @FacesComponent and he's working but only when he is not inside a loop like <code>&lt;ui:repeat&gt;</code>. When I'm using the following code, my component is displaying null values for price and photo but not for name. Do you have an explaination ?</p>
  
  <p>XHTML code : </p>
  
  <pre><code>&lt;ui:define name="content"&gt;
      &lt;f:view&gt;
          &lt;h:form&gt;
              &lt;ui:repeat value="#{dataManagedBean.listNewestCocktails}" var="item" varStatus="status"&gt;
                  &lt;h:outputText value="#{item.price}"/&gt; &lt;!--working very well--&gt;
                  &lt;t:cocktailVignette idPrefix="newCocktails" name="foo" price="#{item.price}" urlPhoto="#{item.photoURI}"/&gt;   &lt;!-- not working the getPrice here --&gt;
              &lt;/ui:repeat&gt;
  
              &lt;!--&lt;t:cocktailVignette idPrefix="allCocktails" name="OSEF" price="20" urlPhoto="osefdelurl" &gt;&lt;/t:cocktailVignette&gt; --&gt;
          &lt;/h:form&gt;               
      &lt;/f:view&gt; 
  </code></pre>
  
  <p>My component code : </p>
  
  <pre><code>    package component;
  
  import java.io.IOException;
  import javax.faces.context.FacesContext;
  import javax.faces.component.FacesComponent;
  import javax.faces.component.UIComponentBase;
  import javax.faces.context.ResponseWriter;
  
  @FacesComponent(value = "CocktailVignette")
  public class CocktailVignette extends UIComponentBase {
  
      private String idPrefix;
      private String name;
      private String price;
      private String urlPhoto;
  
      public String getIdPrefix() {
          return idPrefix;
      }
  
      public void setIdPrefix(String idPrefix) {
          this.idPrefix = idPrefix;
      }
  
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getPrice() {
          return price;
      }
  
      public void setPrice(String price) {
          this.price = price;
      }
  
      public String getUrlPhoto() {
          return urlPhoto;
      }
  
      public void setUrlPhoto(String urlPhoto) {
          this.urlPhoto = urlPhoto;
      }
  
      @Override
      public String getFamily() {
          return "CocktailVignette";
      }
  
      @Override
      public void encodeBegin(FacesContext context) throws IOException {
          ResponseWriter writer = context.getResponseWriter();
          writer.write("&lt;div id=\""+idPrefix+name+"\" class=\"cocktail-vignette\"&gt;");
          writer.write("&lt;h2&gt;"+name+"&lt;/h2&gt;");
          writer.write("&lt;h3&gt;"+price+"&lt;/h3&gt;");
          writer.write("&lt;/div&gt;");
      }
  }
  </code></pre>
  
  <p>Thanks a lot :) I'm trying but nothing is working ... </p>