title: How to fill fields according to iteration values of a foreach in JSF?
body: <p>How can I fill my fields in a class according to a variable in a foreach loop?</p>
  
  <pre><code>&lt;c:forEach var="i" begin="1" end="#{resource.numberOfSkills}"&gt;
                                  &lt;h:panelGrid columns="2" cellpadding="5"&gt;
                 *Here my problem* ---&gt; &lt;h:selectOneMenu value="#{**skills.skillFromSelectList${i}**}"&gt;
                                          &lt;f:selectItem itemLabel="Comp" itemValue="" /&gt;
                                          &lt;f:selectItems value="#{skills.listOfTitlesOfSkills}"/&gt;
                                      &lt;/h:selectOneMenu&gt;
                                      &lt;p:rating value="#{skills.levelSkill}"/&gt; 
                                  &lt;/h:panelGrid&gt;
                              &lt;/c:forEach&gt;
  </code></pre>
  
  <p>In my Skills class (different from the Skill class): i have fields:</p>
  
  <pre><code>private Skill skillFromSelectList1;
  private Skill skillFromSelectList2;
  private Skill skillFromSelectList3;
  private Skill skillFromSelectList4;
  private Skill skillFromSelectList5;
  private Skill skillFromSelectList6;
  </code></pre>
  
  <p>I want to fill each of these fields with {<strong>skills.skillFromSelectList${i}</strong>}">. So for the first loop the selected item will be put in skillFromSelectList1. For the second loop the selected items will be put in skillFromSelectList2, etc.</p>